Skip to content

Commit

Permalink
enable inline-preview
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed May 15, 2021
1 parent 79f325f commit cf6faa3
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 64 deletions.
50 changes: 18 additions & 32 deletions docs/src/pages/components/text-fields/TextFieldHiddenLabel.js
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 docs/src/pages/components/text-fields/TextFieldHiddenLabel.tsx
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>
);
}

0 comments on commit cf6faa3

Please sign in to comment.