mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-06-16 12:09:29 +08:00
Summary:
Follow up to 9ec9567390
Closes https://github.com/facebook/react-native/pull/16759
Differential Revision: D6285219
Pulled By: hramos
fbshipit-source-id: 7012d257a5a6cff06cb2d94203a9379e4b7e3c4e
58 lines
920 B
Markdown
58 lines
920 B
Markdown
---
|
|
id: picker-item
|
|
title: Picker.Item
|
|
layout: docs
|
|
category: components
|
|
permalink: docs/picker-item.html
|
|
next: pickerios
|
|
previous: picker
|
|
---
|
|
|
|
Individual selectable item in a [Picker](docs/picker.html).
|
|
|
|
### Props
|
|
|
|
- [`label`](docs/picker-item.html#label)
|
|
- [`color`](docs/picker-item.html#color)
|
|
- [`testID`](docs/picker-item.html#testid)
|
|
- [`value`](docs/picker-item.html#value)
|
|
|
|
---
|
|
|
|
# Reference
|
|
|
|
## Props
|
|
|
|
### `label`
|
|
|
|
Text to display for this item.
|
|
|
|
| Type | Required |
|
|
| - | - |
|
|
| string | Yes |
|
|
|
|
### `color`
|
|
|
|
The value to be passed to picker's `onValueChange` callback when this item is selected. Can be a string or an integer.
|
|
|
|
| Type | Required |
|
|
| - | - |
|
|
| [color](docs/colors.html) | No |
|
|
|
|
### `testID`
|
|
|
|
Used to locate the item in end-to-end tests.
|
|
|
|
| Type | Required |
|
|
| - | - |
|
|
| string | No |
|
|
|
|
### `value`
|
|
|
|
Color of this item's text.
|
|
|
|
| Type | Required | Platform |
|
|
| - | - | - |
|
|
| any | No | Android |
|
|
|