-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathPickerDay2DemoCSSVars.js
More file actions
28 lines (27 loc) · 928 Bytes
/
PickerDay2DemoCSSVars.js
File metadata and controls
28 lines (27 loc) · 928 Bytes
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
import Box from '@mui/material/Box';
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
import { StaticDatePicker } from '@mui/x-date-pickers/StaticDatePicker';
import { PickerDay2, pickerDay2Classes } from '@mui/x-date-pickers/PickerDay2';
export default function PickerDay2DemoCSSVars() {
return (
<LocalizationProvider dateAdapter={AdapterDayjs}>
<Box sx={{ display: 'flex', gap: 4 }}>
<StaticDatePicker
sx={{
[`& .${pickerDay2Classes.root}`]: {
'--PickerDay-horizontalMargin': '8px',
'--PickerDay-size': '24px',
},
}}
slotProps={{
actionBar: {
actions: ['accept', 'cancel'],
},
}}
slots={{ day: PickerDay2 }}
/>
</Box>
</LocalizationProvider>
);
}