feat(Badge): add nowrap prop to purge custom classes
This commit is contained in:
@@ -37,6 +37,11 @@ interface Props extends HTMLAttributes<HTMLSpanElement> {
|
||||
* @default false
|
||||
*/
|
||||
dot?: boolean;
|
||||
/**
|
||||
* Prevent text wrapping
|
||||
* @default false
|
||||
*/
|
||||
nowrap?: boolean;
|
||||
/**
|
||||
* Content snippet
|
||||
*/
|
||||
@@ -51,6 +56,7 @@ let {
|
||||
variant = 'default',
|
||||
size = 'xs',
|
||||
dot = false,
|
||||
nowrap = false,
|
||||
children,
|
||||
class: className,
|
||||
...rest
|
||||
@@ -63,6 +69,7 @@ let {
|
||||
'font-mono uppercase tracking-wide',
|
||||
labelSizeConfig[size],
|
||||
badgeVariantConfig[variant],
|
||||
nowrap && 'text-nowrap',
|
||||
className,
|
||||
)}
|
||||
{...rest}
|
||||
|
||||
Reference in New Issue
Block a user