-
Notifications
You must be signed in to change notification settings - Fork 2
List
brandonk1234 edited this page Feb 23, 2017
·
4 revisions
The ListItems component can be used for displaying pieces of content in a block. The user has the ability to use alternative colours
The props needed for this component are listed and explained below:
-
shouldShowAlternativeColors
- This prop must be aboolean
. -
className
- This prop must be astring
. -
items
- This prop is an array of<ListItem />
components. Inside the<ListItem />
component you should have anitemText
prop, anicon
prop, akey
, and abuttons
prop which contains an array with an object where you input your button info in. See example of that below.
<ListItems
shouldShowAlternativeColors={true}
className="dashboard-items"
items={[
<ListItem
onClick={this.onClick}
itemText="this is the text for the list item"
itemDetail="the item detail"
key={1}
buttons={
[{
type: "primary",
icon: "pencil4",
onClick: this.onClick
}
]}
/>,
/>