File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed
Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @node-core/ui-components" ,
3- "version" : " 1.5.7 " ,
3+ "version" : " 1.5.8 " ,
44 "type" : " module" ,
55 "exports" : {
66 "./*" : [
Original file line number Diff line number Diff line change @@ -49,7 +49,6 @@ export const Medium: Story = {
4949
5050export const Circular : Story = {
5151 args : {
52- circular : true ,
5352 children : 'D' ,
5453 size : 'small' ,
5554 kind : 'error' ,
@@ -58,7 +57,6 @@ export const Circular: Story = {
5857
5958export const MediumCircular : Story = {
6059 args : {
61- circular : true ,
6260 children : 'E' ,
6361 kind : 'warning' ,
6462 } ,
Original file line number Diff line number Diff line change @@ -10,13 +10,11 @@ type BadgeSize = 'small' | 'medium';
1010type BadgeProps = HTMLAttributes < HTMLSpanElement > & {
1111 size ?: BadgeSize ;
1212 kind ?: BadgeKind ;
13- circular ?: boolean ;
1413} ;
1514
1615const Badge : FC < PropsWithChildren < BadgeProps > > = ( {
1716 kind = 'default' ,
1817 size = 'medium' ,
19- circular = false ,
2018 className,
2119 children,
2220 ...props
@@ -26,7 +24,10 @@ const Badge: FC<PropsWithChildren<BadgeProps>> = ({
2624 styles . badge ,
2725 styles [ kind ] ,
2826 styles [ size ] ,
29- { [ styles . circular ] : circular } ,
27+ {
28+ [ styles . circular ] :
29+ typeof children === 'string' && children . length === 1 ,
30+ } ,
3031 className
3132 ) }
3233 { ...props }
You can’t perform that action at this time.
0 commit comments