-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
82ab9d3
commit 31caac7
Showing
7 changed files
with
52 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
packages/components/src/mobile/cycle-select-control/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
CycleSelectControl | ||
=================== | ||
|
||
`CycleSelectControl` is an experimental alternative to SelectControl for mobile. |
35 changes: 35 additions & 0 deletions
35
packages/components/src/mobile/cycle-select-control/index.native.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import CyclePickerCell from '../bottom-sheet/cycle-picker-cell'; | ||
|
||
function CycleSelectControl( { | ||
help, | ||
instanceId, | ||
label, | ||
multiple = false, | ||
onChange, | ||
options = [], | ||
className, | ||
hideLabelFromVision, | ||
...props | ||
} ) { | ||
const id = `inspector-select-control-${ instanceId }`; | ||
|
||
return ( | ||
<CyclePickerCell | ||
label={ label } | ||
hideLabelFromVision={ hideLabelFromVision } | ||
id={ id } | ||
help={ help } | ||
className={ className } | ||
onChangeValue={ onChange } | ||
aria-describedby={ !! help ? `${ id }__help` : undefined } | ||
multiple={ multiple } | ||
options={ options } | ||
{ ...props } | ||
/> | ||
); | ||
} | ||
|
||
export default CycleSelectControl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters