creating service view toggle component
This commit is contained in:
parent
34208cbe67
commit
acb2107fc9
14
frontend/src/components/service/view-toggle.js
Normal file
14
frontend/src/components/service/view-toggle.js
Normal 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;
|
@ -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>
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user