@invisionag/iris-react-section
v3.5.2
Published
```js import Section from '@invisionag/iris-react-section'; ```
Downloads
166
Maintainers
Keywords
Readme
import Section from '@invisionag/iris-react-section';
A basic component to structure elements on a page. Section
takes a title
prop which will be rendered as the sections heading. If title
is a string it
will be wrapped in <Heading as="h1" />
.
additionalInfo
can be passed and will be rendered between title
and children. If additionalInfo
was passed, no separator will be rendered.
Children will be passed straight through but left-indented.
Usage
<Section title="Heading">
<p>Lorem ipsum dolor sid amed.</p>
</Heading>
Pass JSX
<Section title={<Heading as="h1">Heading</Heading>}>
<p>Lorem ipsum dolor sid amed.</p>
</Heading>
additionalInfo
<Section title="Heading" additionalInfo={<span>Some stuff</span>}>
<p>Lorem ipsum dolor sid amed.</p>
</Heading>