From 01af3e8c36df2b760877637d14cb7816260486a5 Mon Sep 17 00:00:00 2001 From: Jori Lallo Date: Tue, 7 Nov 2017 22:02:07 -0800 Subject: [PATCH] CSS fixes --- app/components/Button/Button.js | 28 ++++-------------- app/components/Input/Input.js | 4 +-- app/components/Labeled/Labeled.js | 4 +-- app/components/Labeled/index.js | 3 +- .../Layout/components/SidebarLink.js | 2 +- app/components/Modal/Modal.js | 4 +++ app/scenes/Settings/Settings.js | 29 +++++++++++++++---- 7 files changed, 40 insertions(+), 34 deletions(-) diff --git a/app/components/Button/Button.js b/app/components/Button/Button.js index 411031e4..7ab5581f 100644 --- a/app/components/Button/Button.js +++ b/app/components/Button/Button.js @@ -7,17 +7,17 @@ import { darken, lighten } from 'polished'; const RealButton = styled.button` display: inline-block; margin: 0; - padding: 0; + padding: 4px 12px; border: 0; background: ${color.primary}; color: ${color.white}; border-radius: 4px; font-size: 15px; - min-width: 32px; - min-height: 32px; + height: 36px; text-decoration: none; flex-shrink: 0; outline: none; + cursor: pointer; &::-moz-focus-inner { padding: 0; @@ -70,24 +70,9 @@ const Label = styled.span` ${props => props.hasIcon && 'padding-left: 2px;'} `; -const Inner = styled.span` - padding: 4px 16px; - display: flex; - line-height: 28px; - justify-content: center; - align-items: center; - - ${props => props.small && ` - padding: 1px 10px; - `} - - ${props => props.hasIcon && (props.small ? 'padding-left: 6px;' : 'padding-left: 10px;')} -`; - export type Props = { type?: string, value?: string, - small?: boolean, icon?: React$Element, className?: string, children?: React$Element, @@ -97,7 +82,6 @@ export default function Button({ type = 'text', icon, children, - small, value, ...rest }: Props) { @@ -106,10 +90,8 @@ export default function Button({ return ( - - {hasIcon && icon} - {hasText && } - + {hasIcon && icon} + {hasText && } ); } diff --git a/app/components/Input/Input.js b/app/components/Input/Input.js index 7897b3b3..38a552dc 100644 --- a/app/components/Input/Input.js +++ b/app/components/Input/Input.js @@ -60,11 +60,11 @@ export type Props = { className?: string, }; -export default function Input({ type, label, ...rest }: Props) { +export default function Input({ type, label, className, ...rest }: Props) { const InputComponent = type === 'textarea' ? RealTextarea : RealInput; return ( - +