import { UnorderedList, ListItem } from '@invisionag/iris-react-list';
#DEPRECATED
A basic list component for unordered lists.
Usage
<UnorderedList>
<ListItem>Bullet Point Text 1</ListItem>
<ListItem>Bullet Point Text 2</ListItem>
<ListItem>Bullet Point Text 3</ListItem>
</UnorderedList>
Props
icon
When passed a string, it is used to set an iris icon as bullet point
<UnorderedList icon="check circle">
<ListItem>Bullet Point Text 1</ListItem>
<ListItem>Bullet Point Text 2</ListItem>
<ListItem>Bullet Point Text 3</ListItem>
</UnorderedList>
When passed a react element, the element is rendered as icon
<UnorderedList icon={() => <MyCustomIcon />}>
<ListItem>Bullet Point Text 1</ListItem>
<ListItem>Bullet Point Text 2</ListItem>
<ListItem>Bullet Point Text 3</ListItem>
</UnorderedList>
It is advisable to base the custom icon on the default BulletPoint
component, so native styles are extended instead of overwritten. Examples can be found in the story and test files of this component.