From e26c0de5aeb78fc74365ce4dfa64c7158536a7c7 Mon Sep 17 00:00:00 2001 From: Kyle Alwyn Date: Thu, 12 Jul 2018 18:25:50 -0700 Subject: [PATCH] fix(Input): Remove height from InputContainer --- package.json | 2 +- src/Form/Input.js | 13 +++++-------- src/theme.js | 6 +++--- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index c4988b5..f472393 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "docs": "yarn docz dev", "docs:build": "rimraf dist && yarn docz build", "docs:deploy": "npm run docs:build && gh-pages -d dist", - "prepublishOnly": "npm-run-all docs:deploy build", + "prepublishOnly": "npm-run-all build", "rollup": "rollup -c", "test": "jest", "lint": "eslint src", diff --git a/src/Form/Input.js b/src/Form/Input.js index 4d6aae7..2b1bd70 100644 --- a/src/Form/Input.js +++ b/src/Form/Input.js @@ -9,17 +9,14 @@ import { createComponent } from '../utils'; const InputContainer = createComponent({ name: 'InputContainer', }).extend` - ${({ theme, size }) => css` - position: relative; - height: ${theme.heights[size]}px; - `} + position: relative; `; const StyledInput = createComponent({ name: 'Input', tag: 'input', }).extend` - ${({ isFloating, isFloatable, size, theme, borderRadius = theme.radius }) => css` + ${({ isFloating, size, theme, borderRadius = theme.radius }) => css` border: 1px solid ${theme.colors.grayLight}; height: ${theme.heights[size]}px; display: block; @@ -234,16 +231,16 @@ export default class Input extends React.Component { ); return ( - + {!floating && Label} - + {floating && Label} {multiline ? : } - {!this.state.focused && error ? {error} : null} + {!this.state.focused && error ? {error} : null} ); } diff --git a/src/theme.js b/src/theme.js index 63c50e9..a457363 100644 --- a/src/theme.js +++ b/src/theme.js @@ -55,9 +55,9 @@ export default (passedTheme = {}) => { }; const heights = { - xs: 20, - sm: 28, - md: 32, + xs: 28, + sm: 32, + md: 36, lg: 40, xl: 44, };