@@ -14,26 +14,25 @@ Use [new version of ActionList](/ActionList) with composable API, design updates
1414
1515``` jsx
1616< ActionList
17- role= " listbox"
1817 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' },
2221 ActionList .Divider ,
23- {text: ' Delete file' , variant: ' danger' , role : ' option ' }
22+ {text: ' Delete file' , variant: ' danger' }
2423 ]}
2524/ >
2625```
2726
2827** After**
2928
3029``` 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 >
3534 < ActionList .Divider / >
36- < ActionList .Item variant= " danger" role = " option " > Delete file< / ActionList .Item >
35+ < ActionList .Item variant= " danger" > Delete file< / ActionList .Item >
3736< / ActionList>
3837```
3938
@@ -47,13 +46,12 @@ import {ActionList} from '@primer/react/deprecated'
4746
4847``` jsx live deprecated
4948< ActionList
50- role= " listbox"
5149 items= {[
52- {text: ' New file' , role : ' option ' },
50+ {text: ' New file' },
5351 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' }
5755 ]}
5856/ >
5957```
@@ -62,7 +60,6 @@ import {ActionList} from '@primer/react/deprecated'
6260
6361``` jsx live deprecated
6462< ActionList
65- role= " listbox"
6663 groupMetadata= {[
6764 {groupId: ' 0' },
6865 {groupId: ' 1' , header: {title: ' Live query' , variant: ' subtle' }},
@@ -71,37 +68,34 @@ import {ActionList} from '@primer/react/deprecated'
7168 {groupId: ' 4' }
7269 ]}
7370 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' },
7774 {
7875 key: ' 4' ,
7976 leadingVisual: NoteIcon,
8077 text: ' Table' ,
8178 description: ' Information-dense table optimized for operations across teams' ,
8279 descriptionVariant: ' block' ,
83- groupId: ' 2' ,
84- role: ' option'
80+ groupId: ' 2'
8581 },
8682 {
8783 key: ' 5' ,
8884 leadingVisual: ProjectIcon,
8985 text: ' Board' ,
9086 description: ' Kanban-style board focused on visual states' ,
9187 descriptionVariant: ' block' ,
92- groupId: ' 2' ,
93- role: ' option'
88+ groupId: ' 2'
9489 },
9590 {
9691 key: ' 6' ,
9792 leadingVisual: FilterIcon,
9893 text: ' Save sort and filters to current view' ,
9994 disabled: true ,
100- groupId: ' 3' ,
101- role: ' option'
95+ groupId: ' 3'
10296 },
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}
10599 ]}
106100/ >
107101```
@@ -110,21 +104,17 @@ import {ActionList} from '@primer/react/deprecated'
110104
111105``` jsx deprecated
112106< ActionList
113- role= " listbox"
114107 items= {[
115108 {
116109 text: ' Vanilla link' ,
117- role: ' option' ,
118110 renderItem : props => < ActionList .Item as= " a" href= " /about" {... props} / >
119111 },
120112 {
121113 text: ' React Router link' ,
122- role: ' option' ,
123114 renderItem : props => < ActionList .Item as= {ReactRouterLikeLink} to= " /about" {... props} / >
124115 },
125116 {
126117 text: ' NextJS style' ,
127- role: ' option' ,
128118 renderItem : props => (
129119 < NextJSLikeLink href= " /about" >
130120 < ActionList .Item as= " a" {... props} / >
0 commit comments