# CategoryList

## Props
| Name            | Type                        | Default         | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| --------------- | --------------------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| data            | Array&lt;ArrayItemShape&gt; | []              | false    | Array of data which is rendered in itemRenderer<br>Data shape of `ArrayItemShape` is the following:<br>--<br>`title(string):` String title of category<br>--<br>`catName(string):` catName gets passed into the identifier prop in<br>`<CatItem />` which is then used as a `data-id`<br>--<br>`catData(array)`: Array of data within category                                                                                                   |
| itemRenderer    | any                         | null            | false    | itemRenderer renders items `data` prop                                                                                                                                                                                                                                                                                                                                                                                                           |
| clickComponent  | any                         | null            | false    | `passed down custom component which can be used for toggling visibility of<br>itemRenderer. Receives the following props`<br>---<br>`listKey(number): index for items in category`<br>---<br>`identifier(id): this can be used as data id`<br>---<br>`title(string): Title for your click component`<br>---<br>`isOpen(boolean): props which tracks whether the categoryItem is open or not`<br>---<br>`toggleFn(function): togglesIsOpen state` |
| baseClassName   | string                      | 'category-list' | false    | css class for root div in this component                                                                                                                                                                                                                                                                                                                                                                                                         |
| isOpenByDefault | boolean                     | false           | false    | bool value to determine when the category items are open by default                                                                                                                                                                                                                                                                                                                                                                              |
