@@ -14,12 +14,12 @@ import {
14
14
import { ActionList } from '.'
15
15
import TextInput from '../TextInput'
16
16
import Spinner from '../Spinner'
17
- import Box from '../Box'
18
17
import Text from '../Text'
19
18
import FormControl from '../FormControl'
20
19
import { AriaStatus } from '../live-region'
21
20
import { VisuallyHidden } from '../VisuallyHidden'
22
21
import { ReactRouterLikeLink } from '../Pagination/mocks/ReactRouterLink'
22
+ import classes from './ActionList.examples.stories.module.css'
23
23
24
24
const meta : Meta = {
25
25
title : 'Components/ActionList/Examples' ,
@@ -209,23 +209,20 @@ export function AsyncListWithSpinner(): JSX.Element {
209
209
filter. This pattern can be found in branch selection menus via the SelectPanel component.
210
210
</ p >
211
211
212
- < FormControl sx = { { m : 2 , mb : 0 , width : 'calc(100% - 16px)' } } >
212
+ < FormControl className = { classes . AsyncListSearch } >
213
213
< FormControl . Label > Search branches</ FormControl . Label >
214
214
< TextInput onChange = { filter } block />
215
215
</ FormControl >
216
- { results . length === 0 ? (
217
- < Text sx = { { display : 'block' , fontSize : 1 , m : 2 } } > No branches match that query</ Text >
218
- ) : null }
219
-
216
+ { results . length === 0 ? < Text className = { classes . AsyncListNoMatch } > No branches match that query</ Text > : null }
220
217
< VisuallyHidden >
221
218
< AriaStatus > { getStatusMessage ( ) } </ AriaStatus >
222
219
</ VisuallyHidden >
223
220
224
- < ActionList selectionVariant = "single" role = "listbox" aria-label = "Branch" sx = { { height : 208 , overflow : 'auto' } } >
221
+ < ActionList selectionVariant = "single" role = "listbox" aria-label = "Branch" className = { classes . AsyncListItems } >
225
222
{ loading ? (
226
- < Box sx = { { display : 'flex' , justifyContent : 'center' , pt : 2 } } >
223
+ < div className = { classes . AsyncListSpinner } >
227
224
< Spinner />
228
- </ Box >
225
+ </ div >
229
226
) : (
230
227
results . map ( name => (
231
228
< ActionList . Item key = { name } role = "option" selected = { selected === name } onSelect = { ( ) => setSelected ( name ) } >
@@ -249,7 +246,7 @@ export function AllCombinations(): JSX.Element {
249
246
< code > 16 possible combinations</ code >
250
247
< br />
251
248
< br />
252
- < Box maxWidth = "300px" >
249
+ < div className = { classes . AllCombinationsContainer } >
253
250
< ActionList showDividers >
254
251
< ActionList . Item >
255
252
< ActionList . LeadingVisual >
@@ -438,7 +435,7 @@ export function AllCombinations(): JSX.Element {
438
435
</ ActionList . TrailingVisual >
439
436
</ ActionList . Item >
440
437
</ ActionList >
441
- </ Box >
438
+ </ div >
442
439
</ >
443
440
)
444
441
}
0 commit comments