Section separator is a divider line that compartmentalizes content, typically used on cards or white backgrounds. This should only be used on light backgrounds (with our variable $bg_light
).
import React from 'react' import SectionSeparator from 'playbook-ui' import Flex from 'playbook-ui' import FlexItem from 'playbook-ui' const SectionSeparatorVertical = (props) => { return ( <Flex inline="flex-container" vertical="stretch" > <FlexItem> {'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua'} </FlexItem> <SectionSeparator orientation="vertical" /> <FlexItem> {'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua'} </FlexItem> <SectionSeparator orientation="vertical" /> <FlexItem> {'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua'} </FlexItem> </Flex> ) } export default SectionSeparatorVertical
Pass anything (including any of our kits) to the children
prop to customize a separator's content.
NOTE: passing children
overrides any content passed to text
import React from 'react' import { SectionSeparator, Card, Caption } from 'playbook-ui' const children = ( <Card borderRadius="rounded" justifyContent="center" padding="none" > <Caption paddingLeft="xs" paddingRight="xs" size="xs" text="TODAY" /> </Card> ) const SectionSeparatorChildren = (props) => { return ( <SectionSeparator lineStyle='dashed' > {children} </SectionSeparator> ) } export default SectionSeparatorChildren