Indoqa Rebass Components
A collection of additional rebass components:
<List>
and<ListItem>
: Ordered and unordered lists with default padding/margin settings and configurable listStyleType.<Anchor />
and<AnchorLink />
: Jump to anchors on the same page.<FontAwesome />
: FontAwesome icons with configurable color and size.<Div />
and<Span />
: Simple div/span components with the benefits ofwithRebass()
Live Demo
see https://indoqa.github.io/indoqa-rebass-components/
Usage
Lists
const ListExample = <Div> <List> <ListItem> item 1 </ListItem> <ListItem> item 2 </ListItem> <ListItem> item 3 </ListItem> <ListItem> item 4 </ListItem> </List> <Space y=1 /> <List itemType="circle"> <ListItem> item 1 </ListItem> <ListItem> item 2 </ListItem> <ListItem> item 3 </ListItem> <ListItem> item 4 </ListItem> </List> <Space y=1 /> <List ordered> <ListItem> item 1 </ListItem> <ListItem> item 2 </ListItem> <ListItem> item 3 </ListItem> <ListItem> item 4 </ListItem> </List> <Space y=1 /> <List ordered itemType="lower-alpha"> <ListItem> item 1 </ListItem> <ListItem> item 2 </ListItem> <ListItem> item 3 </ListItem> <ListItem> item 4 </ListItem> </List> </Div>
Anchor/AnchorLinks
const Page = <Div> <AnchorLink to="section2"> Jump to section 2 </AnchorLink> ...... ...... ...... <Anchor id="section2"/> Here starts section 2! </Div>
FontAwesome
const ThumbsUpBigRedIcon = <FontAwesome icon="thumbs-o-up" color="red" size="30px" />
Note: The font-awesome css is treated as optional provided dependency. It is not included in indoqa-rebass-components. Use npm package 'font-awesome' in your app.
Playground
Play around with our live demo locally:
git clone git@github.com:Indoqa/indoqa-rebass-components.gitcd indoqa-rebass-componentsnpm installnpm start
Point your browser to http://localhost:3000 and edit pages in src/playground. Hot reloading is enabled by default.