/
githubmirror
/
material-ui
Обзор
Документация
Войти
/
githubmirror
/
material-ui
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
docs/data/material/customization/css-layers/CssLayersInput.tsx
43 строки
1 KB
Brijesh Bittu
[code-infra] Remove React import requirement for jsx (#47146)
29 окт 2025, 20:55
Не верифицирован
29 окт 2025, 20:55
6c9e82f
Код
Авторство
О чём код?
import { createTheme, ThemeProvider } from '@mui/material/styles'; import FormControl from '@mui/material/FormControl'; import InputLabel from '@mui/material/InputLabel'; import OutlinedInput from '@mui/material/OutlinedInput'; import FormHelperText from '@mui/material/FormHelperText'; const theme = createTheme({ modularCssLayers: true, cssVariables: true, }); export default function CssLayersInput() { return ( <ThemeProvider theme={theme}> <FormControl variant="outlined"> <InputLabel shrink htmlFor="css-layers-input" sx={{ width: 'fit-content', transform: 'none', position: 'relative', mb: 0.25, fontWeight: 'medium', pointerEvents: 'auto', }} > Label </InputLabel> <OutlinedInput id="css-layers-input" placeholder="Type something" slotProps={{ input: { sx: { py: 1.5, height: '2.5rem', boxSizing: 'border-box' }, }, }} /> <FormHelperText sx={{ marginLeft: 0 }}>Helper text goes here</FormHelperText> </FormControl> </ThemeProvider> ); }