File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed
packages/react/src/ActionList Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @primer/react " : patch
3
+ ---
4
+
5
+ ActionList: Fix leaky description styles for disabled item
Original file line number Diff line number Diff line change @@ -28,23 +28,15 @@ export const Description: React.FC<React.PropsWithChildren<ActionListDescription
28
28
minWidth : 0 ,
29
29
marginLeft : variant === 'block' ? 0 : 2 ,
30
30
color : 'fg.muted' ,
31
- 'li[aria-disabled="true"] &' : {
32
- color : 'inherit' ,
33
- } ,
34
- 'li[data-variant="danger"]:hover &, li[data-variant="danger"]:active &' : {
35
- color : 'inherit' ,
36
- } ,
31
+ 'li[aria-disabled="true"] &[data-component="ActionList.Description"]' : { color : 'inherit' } ,
32
+ 'li[data-variant="danger"]:hover &[data-component="ActionList.Description"], li[data-variant="danger"]:active &[data-component="ActionList.Description"]' :
33
+ { color : 'inherit' } ,
37
34
}
38
35
39
36
const { blockDescriptionId, inlineDescriptionId} = React . useContext ( ItemContext )
40
37
41
38
return variant === 'block' ? (
42
- < Box
43
- as = "span"
44
- // huh why?
45
- sx = { merge ( styles , sx as SxProp ) }
46
- id = { blockDescriptionId }
47
- >
39
+ < Box as = "span" sx = { merge ( styles , sx as SxProp ) } id = { blockDescriptionId } data-component = "ActionList.Description" >
48
40
{ props . children }
49
41
</ Box >
50
42
) : (
@@ -54,6 +46,7 @@ export const Description: React.FC<React.PropsWithChildren<ActionListDescription
54
46
title = { props . children as string }
55
47
inline = { true }
56
48
maxWidth = "100%"
49
+ data-component = "ActionList.Description"
57
50
>
58
51
{ props . children }
59
52
</ Truncate >
You can’t perform that action at this time.
0 commit comments