<FormControl fullWidth variant="filled" sx={{...styleForms, px: 1.5, backgroundColor:…
- User
<FormControl fullWidth variant="filled" sx={{...styleForms, px: 1.5, backgroundColor: theme => theme.palette.grey[600]}} > Новый пароль <Input id="standard-adornment-password" type={showPassword.confirm ? "text" : "password"} value={confirmPassword} onChange={e => setConfirmPassword(e.target.value)} endAdornment={ <IconButton aria-label="toggle password visibility" onClick={() => { setShowPassword({...showPassword, confirm: !showPassword.confirm}); }} > {showPassword.confirm ? : } } /> как сделать точки в password размером 25px
- Assistant
Для установки размера точек в поле пароля размером в 25 пикселей, вы можете использовать свойство
sxи задать размер точек с помощью свойстваfontSize. Вот пример кода:<FormControl fullWidth variant="filled" sx={{...styleForms, px: 1.5, backgroundColor: theme => theme.palette.grey[600]}} > <InputLabel htmlFor="standard-adornment-password">Новый пароль</InputLabel> <Input id="standard-adornment-password" type={showPassword.confirm ? "text" : "password"} value={confirmPassword} onChange={e => setConfirmPassword(e.target.value)} endAdornment={ <InputAdornment position="end"> <IconButton aria-label="toggle password visibility" onClick={() => { setShowPassword({...showPassword, confirm: !showPassword.confirm}); }} > {showPassword.confirm ? <VisibilityOffRounded /> : <VisibilityRounded />} </IconButton> </InputAdornment> } sx={{ fontSize: 25 }} /> </FormControl>В этом примере свойство
sx={{ fontSize: 25 }}устанавливает размер шрифта в поле ввода пароля на 25 пикселей. - User
на точки это не распространяется
- Assistant
Извините за недоразумение. Действительно, свойство
fontSizeне применяется к точкам в поле ввода пароля. Однако, вы можете внести стили через класс CSS. Вот пример:import { makeStyles } from '@mui/styles'; const useStyles = makeStyles({ passwordDots: { fontSize: '25px', }, }); // В компоненте const classes = useStyles(); <FormControl fullWidth variant="filled" sx={{...styleForms, px: 1.5, backgroundColor: theme => theme.palette.grey[600]}} > <InputLabel htmlFor="standard-adornment-password">Новый пароль</InputLabel> <Input id="standard-adornment-password" type={showPassword.confirm ? "text" : "password"} value={confirmPassword} onChange={e => setConfirmPassword(e.target.value)} endAdornment={ <InputAdornment position="end"> <IconButton aria-label="toggle password visibility" onClick={() => { setShowPassword({...showPassword, confirm: !showPassword.confirm}); }} > {showPassword.confirm ? <VisibilityOffRounded /> : <VisibilityRounded />} </IconButton> </InputAdornment> } classes={{ adornedEnd: classes.passwordDots }} /> </FormControl>