fix: set nowrap in chip (#1590)

* fix: set nowrap in chip

* Create early-garlics-deliver.md
This commit is contained in:
Jakob Guddas 2023-09-10 21:16:06 +02:00 committed by GitHub
parent 8606fbe0b9
commit 5c30e04811
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
"@nextui-org/theme": patch
---
fix: set nowrap in chip

View File

@ -100,3 +100,17 @@ export const WithAvatar = {
avatar: <Avatar name="JW" src="https://i.pravatar.cc/300?u=a042581f4e29026709d" />,
},
};
const HiddenOverflowTemplate = (args: ChipProps) => (
<div className="w-20 border-danger-500 border-2">
<Chip {...args} />
</div>
);
export const HiddenOverflow = {
render: HiddenOverflowTemplate,
args: {
...defaultProps,
children: "Hello World!",
},
};

View File

@ -22,7 +22,15 @@ import {ringClasses, colorVariants} from "../utils";
*/
const chip = tv({
slots: {
base: ["relative", "max-w-fit", "inline-flex", "items-center", "justify-between", "box-border"],
base: [
"relative",
"max-w-fit",
"inline-flex",
"items-center",
"justify-between",
"box-border",
"whitespace-nowrap",
],
content: "flex-1 text-inherit font-normal",
dot: ["w-2", "h-2", "ml-1", "rounded-full"],
avatar: "flex-shrink-0",