mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
fix(components): isOnechar value was not beign passed to the badge component
This commit is contained in:
parent
40064f45db
commit
dbe37da64f
@ -59,6 +59,7 @@ const Badge = forwardRef<BadgeProps, "span">((props, ref) => {
|
||||
css={{...badgeCss, ...css}}
|
||||
disableAnimation={disableAnimation || !asChild}
|
||||
disableOutline={variant === "bordered" || disableOutline}
|
||||
isOneChar={isOneChar}
|
||||
{...otherProps}
|
||||
>
|
||||
{badgeChildren}
|
||||
|
||||
@ -23,7 +23,7 @@ export const Default = () => <Badge>Default</Badge>;
|
||||
export const WithAvatar = () => (
|
||||
<Grid.Container gap={1} justify="center">
|
||||
<Grid>
|
||||
<Badge color="error" content={5} size="sm">
|
||||
<Badge color="error" content={5}>
|
||||
<Avatar
|
||||
bordered
|
||||
pointer
|
||||
@ -35,7 +35,7 @@ export const WithAvatar = () => (
|
||||
</Badge>
|
||||
</Grid>
|
||||
<Grid>
|
||||
<Badge color="error" content={5} placement="bottom-right" shape="circle" size="sm">
|
||||
<Badge color="error" content={5} placement="bottom-right" shape="circle">
|
||||
<Avatar
|
||||
bordered
|
||||
pointer
|
||||
@ -72,7 +72,7 @@ export const WithContentIcon = () => (
|
||||
</Badge>
|
||||
);
|
||||
|
||||
// TODO: create
|
||||
// TODO: create switch
|
||||
// export const ToggleBadge = () => {
|
||||
// const [isInvisible, setIsInvisible] = React.useState(false);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user