Skip to content

Commit

Permalink
Adds TextArea to InputBase. Fixes small spacing bug in the input elem…
Browse files Browse the repository at this point in the history
…ent.
  • Loading branch information
loriensleafs committed Mar 25, 2019
1 parent 6aef182 commit ad87877
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/InputBase/InputBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import React, {
useState,
} from 'react';
import { FormControlContext, useFormControl } from '../FormControl';
import TextArea from './Textarea';
import usePrevious from '../hooks/usePrevious';
import useStyles from '../system/useStyles';
import combine from '../utils/combine';
Expand Down Expand Up @@ -36,7 +37,10 @@ const getBaseStyles = props => {
width: '100%',
minWidth: '0px',
margin: '0px',
padding: '6px 0 7px',
paddingTop: '6px',
paddingRight: '0px',
paddingBottom: '7px',
paddingLeft: '0px',
display: 'block',
font: 'inherit',
border: '0px',
Expand Down Expand Up @@ -89,7 +93,7 @@ const getFullWidthStyles = ({ fullWidth }) =>
const getMarginStyles = ({ margin, theme: { spacing } }) =>
margin === 'dense' && {
input: {
paddingTop: `${spacing[0] - 1}px`,
paddingTop: `${spacing[1] - 1}px`,
},
};

Expand Down Expand Up @@ -124,8 +128,8 @@ const getTypeStyles = ({ type }) => {
const getStyles = combine(
getBaseStyles,
getFullWidthStyles,
getMarginStyles,
getMultilineStyles,
getMarginStyles,
getTypeStyles,
getDisabledStyles,
);
Expand Down

0 comments on commit ad87877

Please sign in to comment.