Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/www/src/content/docs/components/badge/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Choose between different variants to convey different meanings or importance lev

### Size

Three sizes. `regular` is the default; `small` and `micro` fit inside table rows and beside dense labels.
Three sizes. `small` is the default. `regular` matches body text and suits badges that stand alone, for example beside a heading. `micro` fits inside table rows and beside dense labels.

<Demo data={sizesDemo} />

Expand Down
14 changes: 6 additions & 8 deletions packages/raystack/components/badge/badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,23 @@ const badge = cva(styles['badge'], {
micro: styles['badge-micro'],
small: styles['badge-small'],
regular: styles['badge-regular']
},
defaultVariants: {
variant: 'accent',
size: 'small'
}
},
defaultVariants: {
variant: 'accent',
size: 'small'
}
});

type BadgeProps = VariantProps<typeof badge> &
Comment thread
rohanchkrabrty marked this conversation as resolved.
ComponentProps<'span'> & {
icon?: ReactNode;
children: ReactNode;
className?: string;
screenReaderText?: string;
};

export const Badge = ({
variant = 'accent',
size = 'small',
variant,
size,
radius,
icon,
children,
Expand Down
Loading