diff --git a/frontend/src/components/new-project/billing.js b/frontend/src/components/new-project/billing.js index 441fb76e..de4594c7 100644 --- a/frontend/src/components/new-project/billing.js +++ b/frontend/src/components/new-project/billing.js @@ -6,12 +6,17 @@ const constants = require('@ui/shared/constants'); const fns = require('@ui/shared/functions'); const Button = require('@ui/components/button'); +const BaseElements = require('@ui/components/base-elements'); const Card = require('@ui/components/payment-card'); const { FormattedMessage } = ReactIntl; +const { + H2, +} = BaseElements; + const { default: styled } = Styled; @@ -35,7 +40,7 @@ const Container = styled.div` padding: ${remcalc(96)} ${remcalc(40)}; `; -const Title = styled.h2` +const Title = styled(H2)` margin: 0 0 ${remcalc(18)} 0; font-size: ${remcalc(36)}; color: ${colors.brandSecondaryColor}; diff --git a/frontend/src/components/new-project/index.js b/frontend/src/components/new-project/index.js index 19a5a3d2..c4dcf705 100644 --- a/frontend/src/components/new-project/index.js +++ b/frontend/src/components/new-project/index.js @@ -8,6 +8,11 @@ const fns = require('@ui/shared/functions'); const Input = require('@ui/components/input'); const Button = require('@ui/components/button'); +const BaseElements = require('@ui/components/base-elements'); + +const { + H2, +} = BaseElements; const { Field @@ -33,7 +38,7 @@ const Container = styled.div` padding: ${remcalc(96)} ${remcalc(40)}; `; -const Title = styled.h2` +const Title = styled(H2)` margin: 0 0 ${remcalc(18)} 0; font-size: ${remcalc(36)}; color: ${colors.brandSecondaryColor}; diff --git a/frontend/src/components/new-project/new-billing.js b/frontend/src/components/new-project/new-billing.js index 2b37359a..c939b803 100644 --- a/frontend/src/components/new-project/new-billing.js +++ b/frontend/src/components/new-project/new-billing.js @@ -8,6 +8,11 @@ const fns = require('@ui/shared/functions'); const Input = require('@ui/components/input'); const Button = require('@ui/components/button'); +const BaseElements = require('@ui/components/base-elements'); + +const { + H2, +} = BaseElements; const { Field @@ -33,7 +38,7 @@ const Container = styled.div` padding: ${remcalc(96)} ${remcalc(40)}; `; -const Title = styled.h2` +const Title = styled(H2)` margin: 0 0 ${remcalc(18)} 0; font-size: ${remcalc(36)}; color: ${colors.brandSecondaryColor}; diff --git a/frontend/src/components/people-list/index.js b/frontend/src/components/people-list/index.js index 6c01d537..f4f65ada 100644 --- a/frontend/src/components/people-list/index.js +++ b/frontend/src/components/people-list/index.js @@ -1,4 +1,5 @@ const React = require('react'); +const Styled = require('styled-components'); const Empty = require('@components/empty/people'); @@ -9,9 +10,13 @@ const Button = require('@ui/components/button'); const PeopleTable = require('./table'); const Invite = require('./invite'); -const buttonStyle = { - float: 'right' -}; +const { + default: styled +} = Styled; + +const StyledButton = styled(Button)` + float: right; +`; const People = (props) => { const { @@ -24,13 +29,12 @@ const People = (props) => {
- + diff --git a/frontend/src/components/people-list/invite.js b/frontend/src/components/people-list/invite.js index 4a0a8605..aa9b9576 100644 --- a/frontend/src/components/people-list/invite.js +++ b/frontend/src/components/people-list/invite.js @@ -72,10 +72,10 @@ const Invite = React.createClass({ const { handleToggle, - // UI = {}, - // people = [], } = this.props; + // TODO: When removing react-select css + // change this to styled-components format const InputStyle = { float: 'left', width: '75%', @@ -84,14 +84,14 @@ const Invite = React.createClass({ paddingTop: '10px' }; - const AddButtonStyle = { - float: 'right', - width: '20%' - }; + const StyledSubmitButton = styled(Button)` + float: right; + width: 20%; + `; - const styleInline = { - display: 'inline-block' - }; + const StyledInlineButton = styled(Button)` + display: inline-block; + `; const selectData = this.getFormattedPlatformMembers(); @@ -121,30 +121,26 @@ const Invite = React.createClass({ value={this.state.selectValue} /> - + - + - + ); diff --git a/frontend/src/components/people-list/table/tooltip.js b/frontend/src/components/people-list/table/tooltip.js index 17ef7ed7..7a125bc1 100644 --- a/frontend/src/components/people-list/table/tooltip.js +++ b/frontend/src/components/people-list/table/tooltip.js @@ -1,13 +1,18 @@ const React = require('react'); +const Styled = require('styled-components'); const Tooltip = require('@ui/components/tooltip'); -const tooltipStyle = { - position: 'absolute', - top: '30px', - zIndex: 1, - right: '-36px', -}; +const { + default: styled +} = Styled; + +const StyledTooltip = styled(Tooltip)` + position: absolute; + top: 30px; + z-index: 1; + right: -36px; +`; const arrowPosition = { bottom: '100%', @@ -51,13 +56,12 @@ module.exports = ({ }); return ( - {_options} - + ); }; diff --git a/ui/src/components/close/index.js b/ui/src/components/close/index.js index 07658740..d69296de 100644 --- a/ui/src/components/close/index.js +++ b/ui/src/components/close/index.js @@ -17,18 +17,14 @@ const StyledButton = styled.button` position: absolute; top: ${remcalc(16)}; right: ${remcalc(16)}; - - ${props => props.customStyles ? props.customStyles : null} `; const Close = ({ style, onClick, - customStyles = '' }) => { return ( @@ -41,7 +37,6 @@ const Close = ({ }; Close.propTypes = { - customStyles: React.PropTypes.string, onClick: React.PropTypes.func, style: React.PropTypes.object }; diff --git a/ui/src/components/radio-group/item.js b/ui/src/components/radio-group/item.js index 98177329..18333b44 100644 --- a/ui/src/components/radio-group/item.js +++ b/ui/src/components/radio-group/item.js @@ -1,19 +1,15 @@ const React = require('react'); -// const composers = require('../../shared/composers'); const fns = require('../../shared/functions'); const Styled = require('styled-components'); const constants = require('../../shared/constants'); -// const { -// verticallyAlignCenter -// } = composers; - const { remcalc } = fns; const { - boxes + boxes, + colors } = constants; const { @@ -21,7 +17,7 @@ const { } = Styled; const RadioItem = styled.div` - background: #FFFFFF; + background: ${colors.base.white}; border: ${boxes.border.unchecked}; cursor: pointer; flaot: left; diff --git a/ui/src/components/radio-group/style.css b/ui/src/components/radio-group/style.css deleted file mode 100644 index 61e7680e..00000000 --- a/ui/src/components/radio-group/style.css +++ /dev/null @@ -1,33 +0,0 @@ -~boxes: "../../shared/constants.js"; -~colors: "../../shared/constants.js"; - -:root { - --border-checked: ~boxes.border.checked; - --border-unchecked: ~boxes.border.unchecked; - --border-radius: remcalc(~boxes.borderRadius); - --bottom-shaddow: ~boxes.bottomShaddow; -} - -.group { - & .item { - background: #FFFFFF; - cursor: pointer; - margin-bottom: remcalc(15); - padding: remcalc(25); - - @add-mixin create-base-box-properties; - - &:last-child { - margin-bottom: initial; - } - - &.checked { - border: var(--border-checked); - box-shadow: var(--bottom-shaddow); - } - - &.disabled { - cursor: default; - } - } -} diff --git a/ui/src/components/radio/index.js b/ui/src/components/radio/index.js index 8c57492c..cf1a77cc 100644 --- a/ui/src/components/radio/index.js +++ b/ui/src/components/radio/index.js @@ -31,8 +31,7 @@ const StyledInput = styled.input` } `; -const StyledLabel = styled.label` -`; +const StyledLabel = styled.label``; const StyledContent = styled.div` margin-left: ${remcalc(45)}; @@ -82,7 +81,7 @@ const Radio = ({ }) => { return ( - + { return ( - + {title} ( - + {children} ); Table.propTypes = { children: React.PropTypes.node, + style: React.PropTypes.object, title: React.PropTypes.string, }; diff --git a/ui/src/components/textarea/index.js b/ui/src/components/textarea/index.js index f11d8aaa..e8511276 100644 --- a/ui/src/components/textarea/index.js +++ b/ui/src/components/textarea/index.js @@ -81,7 +81,7 @@ const Textarea = ({ const _error = error ? ({error}) : null; return ( -
+