import React, { Fragment } from 'react'; import styled from 'styled-components'; import { Margin } from 'styled-components-spacing'; import Flex from 'styled-flex-component'; import { Field } from 'redux-form'; import titleCase from 'title-case'; import remcalc from 'remcalc'; import { H5, Select as BaseSelect, Input as BaseInput, FormGroup, FormMeta } from 'joyent-ui-toolkit'; const style = { lineHeight: remcalc(48), fontSize: remcalc(18) }; const Bold = styled.span` font-weight: ${props => props.theme.font.weight.semibold}; `; const Select = styled(BaseSelect)` color: rgba(73, 73, 73, 0.5); border-color: rgba(73, 73, 73, 0.5); `; const Input = styled(BaseInput)` border-color: rgba(73, 73, 73, 0.5); `; const Values = touched => ( ); export const Rule = ({ valid, ...rule }) => (
The instance
be on
node as the instance(s) identified by the
{Values(rule.pattern)}
); export const Header = ({ rule }) => ( {titleCase(rule.conditional)}: be on a {rule.placement} node as the instance(s) identified by the instance {rule.type} {rule.type === 'name' ? ( {' '} {rule.pattern} “{rule.value}” ) : ( {' '} key “{rule.name}" and the instance tag value{' '} {rule.pattern && rule.pattern.split('-').join(' ')} "{rule.value}” )} );