diff --git a/ui/src/components/button/index.js b/ui/src/components/button/index.js index 0d927f61..1023488d 100644 --- a/ui/src/components/button/index.js +++ b/ui/src/components/button/index.js @@ -55,6 +55,6 @@ module.exports = styled.button` padding: ${remcalc('18 24')}; background: ${background}; - border: 1px solid ${border}; + border: solid 1px ${border}; color: ${color}; `; diff --git a/ui/src/components/checkbox/index.js b/ui/src/components/checkbox/index.js index 537aca01..c6110a39 100644 --- a/ui/src/components/checkbox/index.js +++ b/ui/src/components/checkbox/index.js @@ -24,10 +24,55 @@ const styles = { }; const StyledInput = styled.input` + visibility: hidden; + &:checked + label::after { + opacity: 1; + } + &:disabled + label { + background-color: rgb(249, 249, 249); + } + &:disabled + label::after { + opacity: 0.3; + } `; const StyledLabel = styled.label` - color: #646464; + color: rgb(100, 100, 100); + position: absolute; + width: 24px; + height: 24px; + top: 0; + border-radius: ${boxes.borderRadius}; + background-color: rgb(255, 255, 255); + box-shadow: ${boxes.insetShaddow}; + border: ${boxes.border.unchecked}; + + &::after { + opacity: 0; + content: ''; + position: absolute; + width: 9px; + height: 4px; + background: transparent; + top: 7px; + left: 7px; + border: 3px solid #333; + border-top: none; + border-right: none; + transform: rotate(-45deg); + } + + &:hover { + &::after { + opacity: 0.3; + } + } +`; + +const StyledDiv = styled.div` + width: 24px; + height: 24px; + position: relative; `; const Checkbox = ({ @@ -45,21 +90,12 @@ const Checkbox = ({ style, tabIndex }) => { - const cn = classNames( - className, - styles.checkbox, - checked ? styles.checked : '', - disabled ? styles.disabled : '' - ); - return ( - + - {children} - + + {children} + + ); }; diff --git a/ui/src/shared/constants.js b/ui/src/shared/constants.js index 991384a6..ce5360b6 100644 --- a/ui/src/shared/constants.js +++ b/ui/src/shared/constants.js @@ -1,6 +1,5 @@ const styled = require('styled-components'); - const calc = require('reduce-css-calc'); const traverse = require('traverse'); const isFunction = require('lodash.isfunction'); @@ -76,7 +75,7 @@ const boxes = { insetShaddow: 'inset 0 3px 0 0 rgba(0, 0, 0, 0.05)', border: { checked: '1px solid #2532bb', - unchecked: '1px solid #d8d8d8', + unchecked: '1px solid rgb(216, 216, 216)', confirmed: '1px solid #23AC32' } }; diff --git a/ui/stories/index.js b/ui/stories/index.js index e32510e2..9ab6e1a2 100644 --- a/ui/stories/index.js +++ b/ui/stories/index.js @@ -111,17 +111,11 @@ storiesOf('Button', module) storiesOf('Checkbox', module) .add('Default', () => ( - - Checkbox - + )) .add('Checked', () => ( - - Checkbox Checked - + )) .add('Disabled', () => ( - - Checkbox Disabled - + ));