diff --git a/ui/src/components/button-icon/index.js b/ui/src/components/button-icon/index.js index 87e9982f..37dce81b 100644 --- a/ui/src/components/button-icon/index.js +++ b/ui/src/components/button-icon/index.js @@ -1,3 +1,5 @@ +// TODO this should inherit + const Button = require('../button'); const React = require('react'); const Styled = require('styled-components'); @@ -21,11 +23,9 @@ const ButtonIcon = ({ const Component = styled(Icon)(styles); return ( -
- -
+ ); }; diff --git a/ui/src/components/icon/index.js b/ui/src/components/icon/index.js index ec30f1d4..5217e27b 100644 --- a/ui/src/components/icon/index.js +++ b/ui/src/components/icon/index.js @@ -1,6 +1,14 @@ const React = require('react'); -const classNames = require('classnames'); -const styles = require('./style.css'); +const Styled = require('styled-components'); + +const { + default: styled, + css +} = Styled; + +const styles = css` + font-size: inherit; +`; const Icon = ({ name = 'beer', @@ -8,17 +16,11 @@ const Icon = ({ iconSet = 'fa', style }) => { - const Component = require(`react-icons/lib/${iconSet}/${name}`); - - const cn = classNames( - className, - styles.icon - ); + const Icon = require(`react-icons/lib/${iconSet}/${name}`); + const Component = styled(Icon)(styles); return ( -
- -
+ ); };