/
githubmirror
/
material-ui
Обзор
Документация
Войти
/
githubmirror
/
material-ui
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
docs/data/material/components/text-fields/LayoutTextFields.tsx
36 строк
856 B
Brijesh Bittu
[code-infra] Remove React import requirement for jsx (#47146)
29 окт 2025, 20:55
Не верифицирован
29 окт 2025, 20:55
6c9e82f
Код
Авторство
О чём код?
import Box from '@mui/material/Box'; import TextField from '@mui/material/TextField'; function RedBar() { return ( <Box sx={(theme) => ({ height: 20, backgroundColor: 'rgba(255, 0, 0, 0.1)', ...theme.applyStyles('dark', { backgroundColor: 'rgb(255 132 132 / 25%)', }), })} /> ); } export default function LayoutTextFields() { return ( <Box sx={{ display: 'flex', flexDirection: 'column', '& .MuiTextField-root': { width: '25ch' }, }} > <RedBar /> <TextField label={'margin="none"'} id="margin-none" /> <RedBar /> <TextField label={'margin="dense"'} id="margin-dense" margin="dense" /> <RedBar /> <TextField label={'margin="normal"'} id="margin-normal" margin="normal" /> <RedBar /> </Box> ); }