1- import { input } from "../variables" ;
2- import { DropDown } from "./dropdown.js " ;
3- import { TextBox , TextBoxVertical } from "./textbox" ;
4- import { DropDownType } from "../../types/widgets" ;
1+ import { border , contrast , font , input } from "../variables" ;
2+ import { DropDown } from "./dropdown" ;
3+ import { TextBox , TextBoxVertical } from "./textbox" ;
4+ import { DropDownType } from "../../types/widgets" ;
55/*
66
77DISCLAIMER:
@@ -23,22 +23,8 @@ export const ReferenceSelector: DropDownType = {
2323 // numberOfLines and all TextStyle properties are allowed
2424 ...TextBox . label ,
2525 } ,
26- pickerIOS : {
27- // All ViewStyle properties are allowed
28- backgroundColor : input . backgroundColor ,
29- } ,
30- pickerItemIOS : {
31- // All TextStyle properties are allowed
32- } ,
33- pickerBackdropIOS : {
34- // All ViewStyle properties are allowed
35- } ,
36- pickerTopIOS : {
37- // All ViewStyle properties are allowed
38- backgroundColor : input . backgroundColor ,
39- } ,
4026 value : {
41- // All TextStyle properties are allowed
27+ // All TextStyle properties & placeholderTextColor are allowed
4228 color : input . color ,
4329 borderColor : input . borderColor ,
4430 backgroundColor : input . backgroundColor ,
@@ -48,8 +34,11 @@ export const ReferenceSelector: DropDownType = {
4834 borderWidth : input . borderWidth ,
4935 borderRadius : input . borderRadius ,
5036
37+ overflow : "hidden" ,
5138 paddingHorizontal : input . paddingHorizontal ,
5239 paddingVertical : input . paddingVertical ,
40+
41+ placeholderTextColor : input . placeholderTextColor , // Only applied when useUniformDesign is true
5342 } ,
5443 valueDisabled : {
5544 // All TextStyle properties are allowed
@@ -59,14 +48,68 @@ export const ReferenceSelector: DropDownType = {
5948 // All TextStyle properties are allowed
6049 ...TextBox . validationMessage ,
6150 } ,
51+ /* New dropdown styles start */
52+ valueContainer : {
53+ // All ViewStyle properties & rippleColor are allowed
54+ } ,
55+ menuWrapper : {
56+ // All ViewStyle properties are allowed
57+ borderRadius : border . radius ,
58+ shadowColor : "#000" ,
59+ shadowOpacity : 0.2 ,
60+ shadowRadius : 10 ,
61+ elevation : 16 ,
62+ } ,
63+ itemContainer : {
64+ // All ViewStyle properties are allowed
65+ maxWidth : 500 ,
66+ paddingVertical : 6 ,
67+ paddingHorizontal : 16 ,
68+ backgroundColor : input . backgroundColor ,
69+ } ,
70+ item : {
71+ // All TextStlye properties are allowed
72+ color : input . color ,
73+ } ,
74+ selectedItem : {
75+ // All TextStlye properties are allowed
76+ fontWeight : font . weightBold ,
77+ } ,
78+ selectedItemContainer : {
79+ // All ViewStyle properties are allowed
80+ backgroundColor : contrast . lowest ,
81+ } ,
82+ /* New dropdown styles end */
83+ useUniformDesign : true ,
84+ /* Old dropdown styles start */
85+ pickerIOS : {
86+ // All ViewStyle properties are allowed
87+ backgroundColor : input . backgroundColor ,
88+ } ,
89+ pickerItemIOS : {
90+ // All TextStyle properties are allowed
91+ } ,
92+ pickerBackdropIOS : {
93+ // All ViewStyle properties are allowed
94+ } ,
95+ pickerTopIOS : {
96+ // All ViewStyle properties are allowed
97+ backgroundColor : input . backgroundColor ,
98+ } ,
99+ /* Old dropdown styles start */
62100} ;
63101export const ReferenceSelectorVertical : DropDownType = {
64102 container : TextBoxVertical . container ,
65103 label : TextBoxVertical . label ,
66- pickerIOS : ReferenceSelector . pickerIOS ,
67- pickerItemIOS : ReferenceSelector . pickerItemIOS ,
68- pickerBackdropIOS : ReferenceSelector . pickerBackdropIOS ,
69- pickerTopIOS : ReferenceSelector . pickerTopIOS ,
70104 value : DropDown . value ,
71105 validationMessage : TextBoxVertical . validationMessage ,
106+ valueContainer : DropDown . valueContainer ,
107+ menuWrapper : DropDown . menuWrapper ,
108+ itemContainer : DropDown . itemContainer ,
109+ item : DropDown . item ,
110+ useUniformDesign : DropDown . useUniformDesign ,
111+ pickerIOS : DropDown . pickerIOS ,
112+ pickerItemIOS : DropDown . pickerItemIOS ,
113+ pickerBackdropIOS : DropDown . pickerBackdropIOS ,
114+ pickerTopIOS : DropDown . pickerTopIOS ,
72115} ;
0 commit comments