-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
79f325f
commit cf6faa3
Showing
2 changed files
with
36 additions
and
64 deletions.
There are no files selected for viewing
50 changes: 18 additions & 32 deletions
50
docs/src/pages/components/text-fields/TextFieldHiddenLabel.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,31 @@ | ||
import * as React from 'react'; | ||
import Box from '@material-ui/core/Box'; | ||
import FilledInput from '@material-ui/core/FilledInput'; | ||
import Stack from '@material-ui/core/Stack'; | ||
import TextField from '@material-ui/core/TextField'; | ||
|
||
export default function TextFieldHiddenLabel() { | ||
return ( | ||
<Box | ||
<Stack | ||
component="form" | ||
sx={{ | ||
'& .MuiFilledInput-root': { m: 1, width: '25ch' }, | ||
width: '25ch', | ||
}} | ||
spacing={2} | ||
noValidate | ||
autoComplete="off" | ||
> | ||
<Box sx={{ display: 'flex', alignItems: 'center' }}> | ||
<label htmlFor="filled-hidden-label-small">Hidden label</label> | ||
<TextField | ||
hiddenLabel | ||
id="filled-hidden-label-small" | ||
defaultValue="Small" | ||
variant="filled" | ||
size="small" | ||
/> | ||
</Box> | ||
<Box sx={{ display: 'flex', alignItems: 'center' }}> | ||
<label htmlFor="filled-hidden-label-normal">Hidden label</label> | ||
<TextField | ||
hiddenLabel | ||
id="filled-hidden-label-normal" | ||
defaultValue="Normal" | ||
variant="filled" | ||
/> | ||
</Box> | ||
<Box sx={{ display: 'flex', alignItems: 'center' }}> | ||
<label htmlFor="filled-hidden-label-input">Hidden label</label> | ||
<FilledInput | ||
hiddenLabel | ||
id="filled-hidden-label-input" | ||
defaultValue="Filled Input" | ||
/> | ||
</Box> | ||
</Box> | ||
<TextField | ||
hiddenLabel | ||
id="filled-hidden-label-small" | ||
defaultValue="Small" | ||
variant="filled" | ||
size="small" | ||
/> | ||
<TextField | ||
hiddenLabel | ||
id="filled-hidden-label-normal" | ||
defaultValue="Normal" | ||
variant="filled" | ||
/> | ||
</Stack> | ||
); | ||
} |
50 changes: 18 additions & 32 deletions
50
docs/src/pages/components/text-fields/TextFieldHiddenLabel.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,31 @@ | ||
import * as React from 'react'; | ||
import Box from '@material-ui/core/Box'; | ||
import FilledInput from '@material-ui/core/FilledInput'; | ||
import Stack from '@material-ui/core/Stack'; | ||
import TextField from '@material-ui/core/TextField'; | ||
|
||
export default function TextFieldHiddenLabel() { | ||
return ( | ||
<Box | ||
<Stack | ||
component="form" | ||
sx={{ | ||
'& .MuiFilledInput-root': { m: 1, width: '25ch' }, | ||
width: '25ch', | ||
}} | ||
spacing={2} | ||
noValidate | ||
autoComplete="off" | ||
> | ||
<Box sx={{ display: 'flex', alignItems: 'center' }}> | ||
<label htmlFor="filled-hidden-label-small">Hidden label</label> | ||
<TextField | ||
hiddenLabel | ||
id="filled-hidden-label-small" | ||
defaultValue="Small" | ||
variant="filled" | ||
size="small" | ||
/> | ||
</Box> | ||
<Box sx={{ display: 'flex', alignItems: 'center' }}> | ||
<label htmlFor="filled-hidden-label-normal">Hidden label</label> | ||
<TextField | ||
hiddenLabel | ||
id="filled-hidden-label-normal" | ||
defaultValue="Normal" | ||
variant="filled" | ||
/> | ||
</Box> | ||
<Box sx={{ display: 'flex', alignItems: 'center' }}> | ||
<label htmlFor="filled-hidden-label-input">Hidden label</label> | ||
<FilledInput | ||
hiddenLabel | ||
id="filled-hidden-label-input" | ||
defaultValue="Filled Input" | ||
/> | ||
</Box> | ||
</Box> | ||
<TextField | ||
hiddenLabel | ||
id="filled-hidden-label-small" | ||
defaultValue="Small" | ||
variant="filled" | ||
size="small" | ||
/> | ||
<TextField | ||
hiddenLabel | ||
id="filled-hidden-label-normal" | ||
defaultValue="Normal" | ||
variant="filled" | ||
/> | ||
</Stack> | ||
); | ||
} |