mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
fix: set nowrap in chip (#1590)
* fix: set nowrap in chip * Create early-garlics-deliver.md
This commit is contained in:
parent
8606fbe0b9
commit
5c30e04811
5
.changeset/early-garlics-deliver.md
Normal file
5
.changeset/early-garlics-deliver.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"@nextui-org/theme": patch
|
||||
---
|
||||
|
||||
fix: set nowrap in chip
|
||||
@ -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!",
|
||||
},
|
||||
};
|
||||
|
||||
@ -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",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user