UNPKG

1.08 kBJavaScriptView Raw
1import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
2import generateUtilityClass from '@mui/utils/generateUtilityClass';
3export function getGrid2UtilityClass(slot) {
4 return generateUtilityClass('MuiGrid2', slot);
5}
6const SPACINGS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
7const DIRECTIONS = ['column-reverse', 'column', 'row-reverse', 'row'];
8const WRAPS = ['nowrap', 'wrap-reverse', 'wrap'];
9const GRID_SIZES = ['auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
10const grid2Classes = generateUtilityClasses('MuiGrid2', ['root', 'container', 'item', 'zeroMinWidth',
11// spacings
12...SPACINGS.map(spacing => `spacing-xs-${spacing}`),
13// direction values
14...DIRECTIONS.map(direction => `direction-xs-${direction}`),
15// wrap values
16...WRAPS.map(wrap => `wrap-xs-${wrap}`),
17// grid sizes for all breakpoints
18...GRID_SIZES.map(size => `grid-xs-${size}`), ...GRID_SIZES.map(size => `grid-sm-${size}`), ...GRID_SIZES.map(size => `grid-md-${size}`), ...GRID_SIZES.map(size => `grid-lg-${size}`), ...GRID_SIZES.map(size => `grid-xl-${size}`)]);
19export default grid2Classes;
\No newline at end of file