> For the complete documentation index, see [llms.txt](https://theoremui.gitbook.io/react-store-ui-template/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://theoremui.gitbook.io/react-store-ui-template/ui/list-items.md).

# List Items

React Native Store UI template some components to render different kinds to list view item which are developed after considering some UI/UX case for store applications.

### ListItem

**Sample**

```jsx
<ListItem 
    icon={<Icon name={global.nextIcon} color={config.defaultFontColor} size={18} />} 
    onPress={() => console.log('do something ...')}
>
    <P nomargin={true}>Edit Profile</P>
</ListItem>

<ListItem 
    icon={<Icon name={global.nextIcon} color={config.defaultFontColor} size={18} />} 
    onPress={() => console.log('do something ...')}
>
    <P nomargin={true}>Transaction History</P>
</ListItem>

<ListItem 
    icon={<Icon name={global.nextIcon} color={config.defaultFontColor} size={18} />} 
    onPress={() => console.log('do something ...')}
>
    <P nomargin={true}>Login</P>
</ListItem>
```

| **Props** | Required | Type      |
| --------- | -------- | --------- |
| icon      | No       | Component |
| onPress   | Yes      | Callback  |

**Output**

![](https://3191317198-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHXqItWiS6ABccRINSZ%2F-MHwOQ7kCixhaGAP30vn%2F-MHwPtELRKrVV-k8w8br%2FScreenshot%202020-09-24%20at%2012.22.41%20AM.png?alt=media\&token=c1c8336f-3b87-43be-a33e-2caa3d8a5686)

### SimpleListItem

**Sample**

```jsx
<SimpleListItem onPress={() => this.props.navigation.navigate('OrderDetail', {order: item})}>
    <Row>
        <Column flex={0.5}>
          <P style={{ color: config.primaryColor }}>Order # SO-10003</P>
					<Sm style={{ color: '#888888', marginBottom: 0 }}>2019/12/12</Sm>
        </Column>
        <Column flex={0.5} align={'flex-end'}>
            <P style={{ fontWeight: 'bold' }}>$1000</P>
					<View style={{flexDirection: 'row'}}>
						<Icon name={"x"} />
						<Sm style={{ color: '#888888' }}>Cancelled</Sm>
					</View>
        </Column>
    </Row>
</SimpleListItem>
```

| **Props** | Required | Type     |
| --------- | -------- | -------- |
| onPress   | Yes      | Callback |

**Output**

![](https://3191317198-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHXqItWiS6ABccRINSZ%2F-MHwQ8-0U7XCHLnkv-Vp%2F-MHwRsZ0vHJ57Sjs_Med%2FScreenshot%202020-09-24%20at%2012.31.38%20AM.png?alt=media\&token=712b9373-00c0-465c-a60f-5acd8436a292)

### **SelectableList**

**Sample**

```jsx
<SelectableList 
		onSelect={(item) => this.setState(
			{selectedFilters: 
				{
					...this.state.selectedFilters, 
					...{color: item.id}
				}
			}
		)}
		isSelected={(item) => this.state.selectedFilters.color == item.id}
		items={sample_data.filters.colors}
/>
```

| **Props**  | Required | Type     |
| ---------- | -------- | -------- |
| onSelect   | Yes      | Function |
| isSelected | Yes      | Function |
| items      | Yes      | Array    |

**Output**

![](https://3191317198-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHXqItWiS6ABccRINSZ%2F-MHwQ8-0U7XCHLnkv-Vp%2F-MHwSkv8LIcn0FXjkRxl%2FScreenshot%202020-09-24%20at%2012.35.43%20AM.png?alt=media\&token=2d090c0b-889e-46ed-a7d8-9d89f1fc90b3)
