File tree Expand file tree Collapse file tree 3 files changed +30
-3
lines changed
packages/@react-spectrum/list Expand file tree Collapse file tree 3 files changed +30
-3
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,8 @@ export function ListViewItem(props) {
118
118
UNSAFE_className : listStyles [ 'react-spectrum-ListViewItem-actions' ] ,
119
119
isQuiet : true ,
120
120
density : 'compact'
121
- }
121
+ } ,
122
+ actionMenu : { UNSAFE_className : listStyles [ 'react-spectrum-ListViewItem-actionmenu' ] , isQuiet : true }
122
123
} } >
123
124
{ typeof item . rendered === 'string' ? < Content > { item . rendered } </ Content > : item . rendered }
124
125
< ClearSlots >
Original file line number Diff line number Diff line change 113
113
grid-template-columns : auto auto auto 1fr auto auto;
114
114
grid-template-rows : 1fr auto;
115
115
grid-template-areas :
116
- "checkbox icon image content actions chevron"
117
- "checkbox icon image description actions chevron"
116
+ "checkbox icon image content actions actionmenu chevron"
117
+ "checkbox icon image description actions actionmenu chevron"
118
118
;
119
119
align-items : center;
120
120
}
169
169
flex-shrink : 0 ;
170
170
}
171
171
172
+ .react-spectrum-ListViewItem-actionmenu {
173
+ grid-area : actionmenu;
174
+ }
175
+
172
176
.react-spectrum-ListView-centeredWrapper {
173
177
display : flex;
174
178
align-items : center;
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import {Flex} from '@react-spectrum/layout';
11
11
import Folder from '@spectrum-icons/workflow/Folder' ;
12
12
import { Heading , Text } from '@react-spectrum/text' ;
13
13
import { IllustratedMessage } from '@react-spectrum/illustratedmessage' ;
14
+ import Info from '@spectrum-icons/workflow/Info' ;
14
15
import { Item , ListView } from '../' ;
15
16
import { Link } from '@react-spectrum/link' ;
16
17
import MoreSmall from '@spectrum-icons/workflow/MoreSmall' ;
@@ -174,6 +175,27 @@ storiesOf('ListView', module)
174
175
</ Item >
175
176
</ ActionMenu >
176
177
) ) )
178
+ . add ( 'actions: ActionGroup + ActionMenu' , ( ) =>
179
+ renderActionsExample ( props => (
180
+ < >
181
+ < ActionGroup buttonLabelBehavior = "hide" { ...props } slot = "actionGroup" >
182
+ < Item key = "info" >
183
+ < Info />
184
+ < Text > Info</ Text >
185
+ </ Item >
186
+ </ ActionGroup >
187
+ < ActionMenu { ...props } slot = "actionMenu" >
188
+ < Item key = "add" >
189
+ < Add />
190
+ < Text > Add</ Text >
191
+ </ Item >
192
+ < Item key = "delete" >
193
+ < Delete />
194
+ < Text > Delete</ Text >
195
+ </ Item >
196
+ </ ActionMenu >
197
+ </ >
198
+ ) ) )
177
199
. add ( 'dynamic items + renderEmptyState' , ( ) => ( < EmptyTest /> ) )
178
200
. add ( 'selectionStyle: highlight' , ( ) => (
179
201
< ListView width = "250px" height = { 400 } selectionStyle = "highlight" selectionMode = "multiple" items = { [ ...Array ( 20 ) . keys ( ) ] . map ( k => ( { key : k , name : `Item ${ k } ` } ) ) } >
You can’t perform that action at this time.
0 commit comments