diff --git a/packages/ui/src/atoms/StateItem.js b/packages/ui/src/atoms/StateItem.js index 3d579363229cba8dbf5beee73f74fee850727b31..3931c08c8b1ca7b79e40c5ccfb414172faef3bfb 100644 --- a/packages/ui/src/atoms/StateItem.js +++ b/packages/ui/src/atoms/StateItem.js @@ -1,7 +1,37 @@ import PropTypes from 'prop-types' +import styled from 'styled-components' import React from 'react' -import classNames from 'classnames' -import classes from './StateItem.local.scss' + +const darkGrey = '#404040' +const lightGrey = '#b3b3b3' + +const disabled = ` + color: ${lightGrey}; + cursor: default; + + &:hover { + color: ${lightGrey}; + } +` + +const Root = styled.span` + cursor: pointer; + font-family: var(--font-interface); + font-size: 16px; + font-style: italic; + padding: 0; + + &:focus { + outline: none; + } + + &:hover { + color: ${darkGrey}; + transition: 0.25s ease-in-out 0s; + } + + ${props => (props.disabled ? disabled : '')}; +` const StateItem = ({ disabled, name, update, values, index }) => { const handleInteraction = () => { @@ -14,10 +44,7 @@ const StateItem = ({ disabled, name, update, values, index }) => { const arrayShift = (array, i) => (i === array.length - 1 ? 0 : i + 1) return ( - <span - className={classNames(classes.root, { - [classes.disabled]: disabled, - })} + <Root disabled={disabled} onClick={handleInteraction} onKeyPress={handleInteraction} @@ -25,7 +52,7 @@ const StateItem = ({ disabled, name, update, values, index }) => { tabIndex="0" > {values[index]} - </span> + </Root> ) } diff --git a/packages/ui/src/atoms/StateItem.local.scss b/packages/ui/src/atoms/StateItem.local.scss deleted file mode 100644 index e96cb249e4500b83e4611a6afee114db3a9b31c7..0000000000000000000000000000000000000000 --- a/packages/ui/src/atoms/StateItem.local.scss +++ /dev/null @@ -1,28 +0,0 @@ -$dark-grey: #404040; -$light-grey: #b3b3b3; - -.root { - cursor: pointer; - font-family: var(--font-interface); - font-size: 16px; - font-style: italic; - padding: 0; - - &:focus { - outline: none; - } - - &:hover { - color: $dark-grey; - transition: 0.25s ease-in-out 0s; - } -} - -.disabled { - color: $light-grey; - cursor: default; - - &:hover { - color: $light-grey; - } -}