fix(components): isOnechar value was not beign passed to the badge component

This commit is contained in:
Junior Garcia 2022-10-11 23:11:44 -03:00
parent 40064f45db
commit dbe37da64f
2 changed files with 4 additions and 3 deletions

View File

@ -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}

View File

@ -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);