Skip to content

Commit c189372

Browse files
authored
Add dropDownTextColor to dropdown picker (#787)
1 parent 8faeae3 commit c189372

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

example/src/PickerExample.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ function PickerExample() {
3131
options={OPTIONS}
3232
value={value1}
3333
mode="dropdown"
34+
dropDownTextColor="red"
3435
onValueChange={(value) => setValue(value.toString())}
3536
style={{ marginBottom: 20 }}
3637
/>

packages/core/src/components/Picker/PickerCommon.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export interface CommonDropDownPickerProps extends CommonPickerProps {
4646
selectedIconSize?: number;
4747
dropDownBackgroundColor?: string;
4848
dropDownBorderColor?: string;
49+
dropDownTextColor?: string;
4950
dropDownBorderWidth?: number;
5051
dropDownBorderRadius?: number;
5152
}

packages/core/src/components/Picker/dropdown/DropDownPicker.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const DropDownPicker: React.FC<
3333
selectedIconSize = 20,
3434
dropDownBackgroundColor = theme.colors.background,
3535
dropDownBorderColor = theme.colors.divider,
36+
dropDownTextColor = theme.colors.strong,
3637
dropDownBorderWidth = 1,
3738
dropDownBorderRadius = 8,
3839
children: childrenProp,
@@ -104,7 +105,7 @@ const DropDownPicker: React.FC<
104105
multiple={isMultiSelect}
105106
style={{ display: "none" }} // To not render the default input container
106107
listItemLabelStyle={[
107-
{ color: theme.colors.strong, fontSize: 14 },
108+
{ color: dropDownTextColor, fontSize: 14 },
108109
pickerItemTextStyles,
109110
]}
110111
selectedItemLabelStyle={[

0 commit comments

Comments
 (0)