forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 1
/
HorizontalDividedList.js
45 lines (44 loc) · 1.29 KB
/
HorizontalDividedList.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import * as React from 'react';
import Avatar from '@mui/joy/Avatar';
import List from '@mui/joy/List';
import ListDivider from '@mui/joy/ListDivider';
import ListItem from '@mui/joy/ListItem';
import ListItemDecorator from '@mui/joy/ListItemDecorator';
export default function HorizontalDividedList() {
return (
<List
row
variant="outlined"
sx={{
bgcolor: 'background.body',
borderRadius: 'sm',
boxShadow: 'sm',
flexGrow: 0,
mx: 'auto',
'--List-decorator-size': '48px',
'--List-item-paddingY': '1rem',
}}
>
<ListItem>
<ListItemDecorator sx={{ alignSelf: 'flex-start' }}>
<Avatar size="sm" src="/static/images/avatar/1.jpg" />
</ListItemDecorator>
Mabel Boyle
</ListItem>
<ListDivider inset="gutter" />
<ListItem>
<ListItemDecorator sx={{ alignSelf: 'flex-start' }}>
<Avatar size="sm" src="/static/images/avatar/2.jpg" />
</ListItemDecorator>
Boyd Burt
</ListItem>
<ListDivider inset="gutter" />
<ListItem>
<ListItemDecorator sx={{ alignSelf: 'flex-start' }}>
<Avatar size="sm" src="/static/images/avatar/3.jpg" />
</ListItemDecorator>
Adam Tris
</ListItem>
</List>
);
}