File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -43,3 +43,14 @@ export const LargeStaticBeta: Story = {
43
43
variant : "static" ,
44
44
} ,
45
45
} ;
46
+
47
+ // While it's possible, we shouldn't use the xs size with the interactive
48
+ // variant, because then the badge might be too small for users with motor
49
+ // control issues to get their hand to hover over the target reliably
50
+ export const ExtraSmallStaticBeta : Story = {
51
+ args : {
52
+ type : "beta" ,
53
+ size : "xs" ,
54
+ variant : "static" ,
55
+ } ,
56
+ } ;
Original file line number Diff line number Diff line change @@ -55,6 +55,10 @@ const styles = {
55
55
fontSize : "1rem" ,
56
56
} ,
57
57
58
+ badgeExtraSmallText : {
59
+ fontSize : "0.625rem" ,
60
+ } ,
61
+
58
62
tooltipTitle : ( theme ) => ( {
59
63
color : theme . palette . text . primary ,
60
64
fontWeight : 600 ,
@@ -80,7 +84,7 @@ const styles = {
80
84
type FeatureBadgeProps = Readonly <
81
85
Omit < HTMLAttributes < HTMLSpanElement > , "children" > & {
82
86
type : keyof typeof featureBadgeTypes ;
83
- size ?: "sm" | "lg" ;
87
+ size ?: "xs" | " sm" | "lg" ;
84
88
variant : "interactive" | "static" ;
85
89
}
86
90
> ;
@@ -116,6 +120,7 @@ export const FeatureBadge: FC<FeatureBadgeProps> = ({
116
120
< span
117
121
css = { [
118
122
styles . badge ,
123
+ size === "xs" && styles . badgeExtraSmallText ,
119
124
size === "lg" && styles . badgeLargeText ,
120
125
showBadgeHoverStyle && styles . badgeHover ,
121
126
] }
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ const DeploymentDropdownContent: FC<DeploymentDropdownProps> = ({
110
110
onClick = { onPopoverClose }
111
111
>
112
112
Organizations
113
- < FeatureBadge type = "beta" size = "sm " variant = "static" />
113
+ < FeatureBadge type = "beta" size = "xs " variant = "static" />
114
114
</ MenuItem >
115
115
) }
116
116
{ canViewAllUsers && (
You can’t perform that action at this time.
0 commit comments