Skip to content

Commit d00319a

Browse files
committed
chore: add ability to override left and right
1 parent b4d3e1c commit d00319a

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/interface/paperSelect.interface.ts

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ export type PaperSelectTextInputProps = Pick<
2222
| 'activeUnderlineColor'
2323
| 'outlineColor'
2424
| 'activeOutlineColor'
25+
| 'left'
26+
| 'right'
2527
>;
2628

2729
export interface PaperSelectProps {

src/module/paperSelect.tsx

+8-7
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ const PaperSelect = ({
7070
textInputPropOverrides?.activeUnderlineColor || 'black',
7171
outlineColor: textInputPropOverrides?.outlineColor || 'black',
7272
activeOutlineColor: textInputPropOverrides?.activeOutlineColor || 'black',
73+
left: textInputPropOverrides?.left,
74+
right: textInputPropOverrides?.right ?? (
75+
<TextInput.Icon
76+
style={styles.textInputIcon}
77+
size={20}
78+
icon="chevron-down"
79+
/>
80+
),
7381
};
7482

7583
const [searchKey, setSearchKey] = useState<string>('');
@@ -244,13 +252,6 @@ const PaperSelect = ({
244252
onFocus={disabled ? undefined : _onFocus}
245253
showSoftInputOnFocus={false}
246254
value={value}
247-
right={
248-
<TextInput.Icon
249-
style={styles.textInputIcon}
250-
size={20}
251-
icon="chevron-down"
252-
/>
253-
}
254255
/>
255256
{errorText ? (
256257
<Text

0 commit comments

Comments
 (0)