@@ -14,26 +14,25 @@ Use [new version of ActionList](/ActionList) with composable API, design updates
14
14
15
15
``` jsx
16
16
< ActionList
17
- role= " listbox"
18
17
items= {[
19
- {text: ' New file' , role : ' option ' },
20
- {text: ' Copy link' , role : ' option ' },
21
- {text: ' Edit file' , role : ' option ' },
18
+ {text: ' New file' },
19
+ {text: ' Copy link' },
20
+ {text: ' Edit file' },
22
21
ActionList .Divider ,
23
- {text: ' Delete file' , variant: ' danger' , role : ' option ' }
22
+ {text: ' Delete file' , variant: ' danger' }
24
23
]}
25
24
/ >
26
25
```
27
26
28
27
** After**
29
28
30
29
``` jsx
31
- < ActionList role = " listbox " >
32
- < ActionList .Item role = " option " > New file< / ActionList .Item >
33
- < ActionList .Item role = " option " > Copy link< / ActionList .Item >
34
- < ActionList .Item role = " option " > Edit file< / ActionList .Item >
30
+ < ActionList>
31
+ < ActionList .Item > New file< / ActionList .Item >
32
+ < ActionList .Item > Copy link< / ActionList .Item >
33
+ < ActionList .Item > Edit file< / ActionList .Item >
35
34
< ActionList .Divider / >
36
- < ActionList .Item variant= " danger" role = " option " > Delete file< / ActionList .Item >
35
+ < ActionList .Item variant= " danger" > Delete file< / ActionList .Item >
37
36
< / ActionList>
38
37
```
39
38
@@ -47,13 +46,12 @@ import {ActionList} from '@primer/react/deprecated'
47
46
48
47
``` jsx live deprecated
49
48
< ActionList
50
- role= " listbox"
51
49
items= {[
52
- {text: ' New file' , role : ' option ' },
50
+ {text: ' New file' },
53
51
ActionList .Divider ,
54
- {text: ' Copy link' , role : ' option ' },
55
- {text: ' Edit file' , role : ' option ' },
56
- {text: ' Delete file' , variant: ' danger' , role : ' option ' }
52
+ {text: ' Copy link' },
53
+ {text: ' Edit file' },
54
+ {text: ' Delete file' , variant: ' danger' }
57
55
]}
58
56
/ >
59
57
```
@@ -62,7 +60,6 @@ import {ActionList} from '@primer/react/deprecated'
62
60
63
61
``` jsx live deprecated
64
62
< ActionList
65
- role= " listbox"
66
63
groupMetadata= {[
67
64
{groupId: ' 0' },
68
65
{groupId: ' 1' , header: {title: ' Live query' , variant: ' subtle' }},
@@ -71,37 +68,34 @@ import {ActionList} from '@primer/react/deprecated'
71
68
{groupId: ' 4' }
72
69
]}
73
70
items= {[
74
- {key: ' 1' , leadingVisual: TypographyIcon, text: ' Rename' , groupId: ' 0' , trailingVisual: ' ⌘R' , role : ' option ' },
75
- {key: ' 2' , leadingVisual: VersionsIcon, text: ' Duplicate' , groupId: ' 0' , role : ' option ' },
76
- {key: ' 3' , leadingVisual: SearchIcon, text: ' repo:github/github' , groupId: ' 1' , role : ' option ' },
71
+ {key: ' 1' , leadingVisual: TypographyIcon, text: ' Rename' , groupId: ' 0' , trailingVisual: ' ⌘R' },
72
+ {key: ' 2' , leadingVisual: VersionsIcon, text: ' Duplicate' , groupId: ' 0' },
73
+ {key: ' 3' , leadingVisual: SearchIcon, text: ' repo:github/github' , groupId: ' 1' },
77
74
{
78
75
key: ' 4' ,
79
76
leadingVisual: NoteIcon,
80
77
text: ' Table' ,
81
78
description: ' Information-dense table optimized for operations across teams' ,
82
79
descriptionVariant: ' block' ,
83
- groupId: ' 2' ,
84
- role: ' option'
80
+ groupId: ' 2'
85
81
},
86
82
{
87
83
key: ' 5' ,
88
84
leadingVisual: ProjectIcon,
89
85
text: ' Board' ,
90
86
description: ' Kanban-style board focused on visual states' ,
91
87
descriptionVariant: ' block' ,
92
- groupId: ' 2' ,
93
- role: ' option'
88
+ groupId: ' 2'
94
89
},
95
90
{
96
91
key: ' 6' ,
97
92
leadingVisual: FilterIcon,
98
93
text: ' Save sort and filters to current view' ,
99
94
disabled: true ,
100
- groupId: ' 3' ,
101
- role: ' option'
95
+ groupId: ' 3'
102
96
},
103
- {key: ' 7' , leadingVisual: FilterIcon, text: ' Save sort and filters to new view' , groupId: ' 3' , role : ' option ' },
104
- {key: ' 8' , leadingVisual: GearIcon, text: ' View settings' , groupId: ' 4' , trailingVisual: ArrowRightIcon, role : ' option ' }
97
+ {key: ' 7' , leadingVisual: FilterIcon, text: ' Save sort and filters to new view' , groupId: ' 3' },
98
+ {key: ' 8' , leadingVisual: GearIcon, text: ' View settings' , groupId: ' 4' , trailingVisual: ArrowRightIcon}
105
99
]}
106
100
/ >
107
101
```
@@ -110,21 +104,17 @@ import {ActionList} from '@primer/react/deprecated'
110
104
111
105
``` jsx deprecated
112
106
< ActionList
113
- role= " listbox"
114
107
items= {[
115
108
{
116
109
text: ' Vanilla link' ,
117
- role: ' option' ,
118
110
renderItem : props => < ActionList .Item as= " a" href= " /about" {... props} / >
119
111
},
120
112
{
121
113
text: ' React Router link' ,
122
- role: ' option' ,
123
114
renderItem : props => < ActionList .Item as= {ReactRouterLikeLink} to= " /about" {... props} / >
124
115
},
125
116
{
126
117
text: ' NextJS style' ,
127
- role: ' option' ,
128
118
renderItem : props => (
129
119
< NextJSLikeLink href= " /about" >
130
120
< ActionList .Item as= " a" {... props} / >
0 commit comments