-
Notifications
You must be signed in to change notification settings - Fork 988
Expand file tree
/
Copy pathBorderRadius.jsx
More file actions
49 lines (45 loc) · 1.33 KB
/
BorderRadius.jsx
File metadata and controls
49 lines (45 loc) · 1.33 KB
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
46
47
48
49
// material-ui
import Grid from '@mui/material/Grid';
import Slider from '@mui/material/Slider';
import Stack from '@mui/material/Stack';
import Typography from '@mui/material/Typography';
// project imports
import useConfig from 'hooks/useConfig';
// concat 'px'
function valueText(value) {
return `${value}px`;
}
export default function BorderRadius() {
const { borderRadius, onChangeBorderRadius } = useConfig();
return (
<Stack spacing={2.5} sx={{ pl: 2, pb: 2, pr: 4 }}>
<Typography variant="h5">BORDER RADIUS</Typography>
<Grid container spacing={1.25} sx={{ pt: 2, alignItems: 'center', justifyContent: 'center' }}>
<Grid>
<Typography variant="h6">4px</Typography>
</Grid>
<Grid size="grow">
<Slider
size="small"
value={borderRadius}
onChange={onChangeBorderRadius}
getAriaValueText={valueText}
valueLabelDisplay="on"
aria-labelledby="discrete-slider-small-steps"
min={4}
max={24}
color="primary"
sx={{
'& .MuiSlider-valueLabel': {
color: 'primary.light'
}
}}
/>
</Grid>
<Grid>
<Typography variant="h6">24px</Typography>
</Grid>
</Grid>
</Stack>
);
}