Spaces:
Sleeping
Sleeping
pythonic-rag-FastAPIReact / frontend /node_modules /@mui /system /esm /createTheme /createSpacing.js
Download frontend/node_modules/@mui/system/esm/createTheme/createSpacing.js from sepidnes/pythonic-rag-FastAPIReact: direct link, hf CLI and curl.
- Browser
- Download file 1.21 kB
-
https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/56fda741e84da791ee2e6198479f1d5630989f6c/frontend/node_modules/%40mui/system/esm/createTheme/createSpacing.js
- Command line
-
hf download hf://spaces/sepidnes/pythonic-rag-FastAPIReact@56fda741e84da791ee2e6198479f1d5630989f6c/frontend/node_modules/@mui/system/esm/createTheme/createSpacing.js
-
curl -L -o createSpacing.js https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/56fda741e84da791ee2e6198479f1d5630989f6c/frontend/node_modules/%40mui/system/esm/createTheme/createSpacing.js
1.21 kB
| import { createUnarySpacing } from '../spacing'; | |
| // The different signatures imply different meaning for their arguments that can't be expressed structurally. | |
| // We express the difference with variable names. | |
| export default function createSpacing(spacingInput = 8) { | |
| // Already transformed. | |
| if (spacingInput.mui) { | |
| return spacingInput; | |
| } | |
| // Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout. | |
| // Smaller components, such as icons, can align to a 4dp grid. | |
| // https://m2.material.io/design/layout/understanding-layout.html | |
| const transform = createUnarySpacing({ | |
| spacing: spacingInput | |
| }); | |
| const spacing = (...argsInput) => { | |
| if (process.env.NODE_ENV !== 'production') { | |
| if (!(argsInput.length <= 4)) { | |
| console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`); | |
| } | |
| } | |
| const args = argsInput.length === 0 ? [1] : argsInput; | |
| return args.map(argument => { | |
| const output = transform(argument); | |
| return typeof output === 'number' ? `${output}px` : output; | |
| }).join(' '); | |
| }; | |
| spacing.mui = true; | |
| return spacing; | |
| } |