Skip to content

Commit

Permalink
push one step further
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jun 7, 2019
1 parent 4a5fa6f commit d154bd1
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 4 deletions.
9 changes: 9 additions & 0 deletions docs/src/pages/components/text-fields/FilledTextFields.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,15 @@ function FilledTextFields() {
margin="dense"
variant="filled"
/>
<TextField
id="filled-dense-multiline"
label="Dense multiline"
className={clsx(classes.textField, classes.dense)}
margin="dense"
variant="filled"
multiline
rowsMax="4"
/>
<TextField
id="filled-multiline-flexible"
label="Multiline"
Expand Down
9 changes: 9 additions & 0 deletions docs/src/pages/components/text-fields/FilledTextFields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,15 @@ function FilledTextFields() {
margin="dense"
variant="filled"
/>
<TextField
id="filled-dense-multiline"
label="Dense multiline"
className={clsx(classes.textField, classes.dense)}
margin="dense"
variant="filled"
multiline
rowsMax="4"
/>
<TextField
id="filled-multiline-flexible"
label="Multiline"
Expand Down
9 changes: 9 additions & 0 deletions docs/src/pages/components/text-fields/OutlinedTextFields.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,15 @@ function OutlinedTextFields() {
margin="dense"
variant="outlined"
/>
<TextField
id="outlined-dense-multiline"
label="Dense multiline"
className={clsx(classes.textField, classes.dense)}
margin="dense"
variant="outlined"
multiline
rowsMax="4"
/>
<TextField
id="outlined-multiline-flexible"
label="Multiline"
Expand Down
9 changes: 9 additions & 0 deletions docs/src/pages/components/text-fields/OutlinedTextFields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,15 @@ function OutlinedTextFields() {
margin="dense"
variant="outlined"
/>
<TextField
id="outlined-dense-multiline"
label="Dense multiline"
className={clsx(classes.textField, classes.dense)}
margin="dense"
variant="outlined"
multiline
rowsMax="4"
/>
<TextField
id="outlined-multiline-flexible"
label="Multiline"
Expand Down
8 changes: 7 additions & 1 deletion packages/material-ui/src/FilledInput/FilledInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,23 @@ export const styles = theme => {
},
/* Styles applied to the root element if `error={true}`. */
error: {},
/* Styles applied to the `input` element if `margin="dense"`. */
marginDense: {},
/* Styles applied to the root element if `multiline={true}`. */
multiline: {
padding: '27px 12px 10px',
'&$marginDense': {
paddingTop: 23,
paddingBottom: 6,
},
},
/* Styles applied to the `input` element. */
input: {
padding: '27px 12px 10px',
},
/* Styles applied to the `input` element if `margin="dense"`. */
inputMarginDense: {
paddingTop: 24,
paddingTop: 23,
paddingBottom: 6,
},
/* Styles applied to the `input` element if `multiline={true}`. */
Expand Down
3 changes: 3 additions & 0 deletions packages/material-ui/src/InputBase/InputBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ export const styles = theme => {
/* Styles applied to the root element if `multiline={true}`. */
multiline: {
padding: `${8 - 2}px 0 ${8 - 1}px`,
'&$marginDense': {
paddingTop: 4 - 1,
},
},
/* Styles applied to the root element if `fullWidth={true}`. */
fullWidth: {
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/InputLabel/InputLabel.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const styles = theme => ({
pointerEvents: 'none',
transform: 'translate(14px, 20px) scale(1)',
'&$marginDense': {
transform: 'translate(14px, 11px) scale(1)',
transform: 'translate(14px, 12px) scale(1)',
},
'&$shrink': {
transform: 'translate(14px, -6px) scale(0.75)',
Expand Down
10 changes: 8 additions & 2 deletions packages/material-ui/src/OutlinedInput/OutlinedInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,15 @@ export const styles = theme => {
},
/* Styles applied to the root element if `error={true}`. */
error: {},
/* Styles applied to the `input` element if `margin="dense"`. */
marginDense: {},
/* Styles applied to the root element if `multiline={true}`. */
multiline: {
padding: '18.5px 14px',
'&$marginDense': {
paddingTop: 10.5,
paddingBottom: 10.5,
},
},
/* Styles applied to the `NotchedOutline` element. */
notchedOutline: {},
Expand All @@ -60,8 +66,8 @@ export const styles = theme => {
},
/* Styles applied to the `input` element if `margin="dense"`. */
inputMarginDense: {
paddingTop: 10,
paddingBottom: 11,
paddingTop: 10.5,
paddingBottom: 10.5,
},
/* Styles applied to the `input` element if `multiline={true}`. */
inputMultiline: {
Expand Down
1 change: 1 addition & 0 deletions pages/api/filled-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ This property accepts the following keys:
| <span class="prop-name">adornedStart</span> | Styles applied to the root element if `startAdornment` is provided.
| <span class="prop-name">adornedEnd</span> | Styles applied to the root element if `endAdornment` is provided.
| <span class="prop-name">error</span> | Styles applied to the root element if `error={true}`.
| <span class="prop-name">marginDense</span> | Styles applied to the `input` element if `margin="dense"`.
| <span class="prop-name">multiline</span> | Styles applied to the root element if `multiline={true}`.
| <span class="prop-name">input</span> | Styles applied to the `input` element.
| <span class="prop-name">inputMarginDense</span> | Styles applied to the `input` element if `margin="dense"`.
Expand Down
1 change: 1 addition & 0 deletions pages/api/outlined-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ This property accepts the following keys:
| <span class="prop-name">adornedStart</span> | Styles applied to the root element if `startAdornment` is provided.
| <span class="prop-name">adornedEnd</span> | Styles applied to the root element if `endAdornment` is provided.
| <span class="prop-name">error</span> | Styles applied to the root element if `error={true}`.
| <span class="prop-name">marginDense</span> | Styles applied to the `input` element if `margin="dense"`.
| <span class="prop-name">multiline</span> | Styles applied to the root element if `multiline={true}`.
| <span class="prop-name">notchedOutline</span> | Styles applied to the `NotchedOutline` element.
| <span class="prop-name">input</span> | Styles applied to the `input` element.
Expand Down

0 comments on commit d154bd1

Please sign in to comment.