mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-17 00:51:07 +08:00
Merge pull request #2378 from danielsogl/patch-11
refactor(WheelSelector): add union type for theme
This commit is contained in:
commit
be02f835bc
@ -42,7 +42,7 @@ export interface WheelSelectorOptions {
|
|||||||
* Android only - theme color, 'light' or 'dark'.
|
* Android only - theme color, 'light' or 'dark'.
|
||||||
* Default: light
|
* Default: light
|
||||||
*/
|
*/
|
||||||
theme?: string;
|
theme?: 'light' | 'dark';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether to have the wheels 'wrap' (Android only)
|
* Whether to have the wheels 'wrap' (Android only)
|
||||||
@ -76,7 +76,7 @@ export interface WheelSelectorData {
|
|||||||
*
|
*
|
||||||
* ...
|
* ...
|
||||||
*
|
*
|
||||||
* let jsonData = {
|
* const jsonData = {
|
||||||
* numbers: [
|
* numbers: [
|
||||||
* { description: "1" },
|
* { description: "1" },
|
||||||
* { description: "2" },
|
* { description: "2" },
|
||||||
@ -105,7 +105,7 @@ export interface WheelSelectorData {
|
|||||||
*
|
*
|
||||||
* ...
|
* ...
|
||||||
*
|
*
|
||||||
* //basic number selection, index is always returned in the result
|
* // basic number selection, index is always returned in the result
|
||||||
* selectANumber() {
|
* selectANumber() {
|
||||||
* this.selector.show({
|
* this.selector.show({
|
||||||
* title: "How Many?",
|
* title: "How Many?",
|
||||||
@ -122,7 +122,7 @@ export interface WheelSelectorData {
|
|||||||
*
|
*
|
||||||
* ...
|
* ...
|
||||||
*
|
*
|
||||||
* //basic selection, setting initial displayed default values: '3' 'Banana'
|
* // basic selection, setting initial displayed default values: '3' 'Banana'
|
||||||
* selectFruit() {
|
* selectFruit() {
|
||||||
* this.selector.show({
|
* this.selector.show({
|
||||||
* title: "How Much?",
|
* title: "How Much?",
|
||||||
@ -145,8 +145,8 @@ export interface WheelSelectorData {
|
|||||||
*
|
*
|
||||||
* ...
|
* ...
|
||||||
*
|
*
|
||||||
* //more complex as overrides which key to display
|
* // more complex as overrides which key to display
|
||||||
* //then retrieve properties from original data
|
* // then retrieve properties from original data
|
||||||
* selectNamesUsingDisplayKey() {
|
* selectNamesUsingDisplayKey() {
|
||||||
* this.selector.show({
|
* this.selector.show({
|
||||||
* title: "Who?",
|
* title: "Who?",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user