creating service view toggle component

This commit is contained in:
Alex Windett 2017-02-07 17:17:38 +00:00
parent 34208cbe67
commit acb2107fc9
4 changed files with 30 additions and 3 deletions

View File

@ -0,0 +1,14 @@
const React = require('react');
const Toggle = require('@ui/components/toggle');
const ServiceToggle = () => {
return (
<div>
<span>View</span>
<Toggle />
</div>
);
};
module.exports = ServiceToggle;

View File

@ -8,6 +8,9 @@ const selectors = require('@state/selectors');
const Row = require('@ui/components/row'); const Row = require('@ui/components/row');
const Column = require('@ui/components/column'); const Column = require('@ui/components/column');
const BaseELements = require('@ui/components/base-elements');
const Toggle = require('@ui/components/toggle');
const { const {
connect connect
} = ReactRedux; } = ReactRedux;
@ -18,6 +21,10 @@ const {
servicesByProjectIdSelector servicesByProjectIdSelector
} = selectors; } = selectors;
const {
H2,
} = BaseELements;
const Services = ({ const Services = ({
org = {}, org = {},
project = {}, project = {},
@ -39,6 +46,12 @@ const Services = ({
return ( return (
<Row> <Row>
<Column xs={12}> <Column xs={12}>
<H2>Services</H2>
<div>
<span>View</span>
<Toggle
/>
</div>
{empty} {empty}
{serviceList} {serviceList}
</Column> </Column>

View File

@ -29,7 +29,7 @@ const StyledText = styled.span`
const StyledDiv = styled.div` const StyledDiv = styled.div`
display: inline-block; display: inline-block;
background-color: ${colors.brandInactive}; background-color: ${colors.base.grey};
${baseBox()} ${baseBox()}
`; `;
@ -48,7 +48,7 @@ const StyledInput0 = styled.input`
& + span { & + span {
background: linear-gradient(to right, background: linear-gradient(to right,
transparent 50%, transparent 50%,
${colors.brandSecondary} 50%); ${colors.base.white} 50%);
background-position: left bottom; background-position: left bottom;
box-shadow: inset box-shadow: inset
${remcalc(-7)} 0 ${remcalc(9)} ${remcalc(-7)} ${remcalc(-7)} 0 ${remcalc(9)} ${remcalc(-7)}
@ -69,7 +69,7 @@ const StyledInput1 = styled.input`
& + span { & + span {
background: linear-gradient(to right, background: linear-gradient(to right,
${colors.brandSecondary} 50%, ${colors.base.white} 50%,
transparent 50%); transparent 50%);
background-position: right bottom; background-position: right bottom;