Skip to content

Commit b4d3e1c

Browse files
committed
fix: pass theme along to all components
1 parent 0825e3b commit b4d3e1c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/module/paperSelect.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ import type {
1919
PaperSelectProps,
2020
PaperSelectTextInputProps,
2121
} from '../interface/paperSelect.interface';
22-
import { useInternalTheme } from 'react-native-paper/lib/typescript/src/core/theming';
22+
import {
23+
ThemeProvider,
24+
useInternalTheme,
25+
} from 'react-native-paper/lib/typescript/src/core/theming';
2326

2427
const PaperSelect = ({
2528
// Required props
@@ -229,7 +232,7 @@ const PaperSelect = ({
229232
};
230233

231234
return (
232-
<>
235+
<ThemeProvider theme={theme}>
233236
<View style={[styles.container, containerStyle]}>
234237
<TextInput
235238
{...textInputProps}
@@ -248,7 +251,6 @@ const PaperSelect = ({
248251
icon="chevron-down"
249252
/>
250253
}
251-
theme={theme}
252254
/>
253255
{errorText ? (
254256
<Text
@@ -325,7 +327,7 @@ const PaperSelect = ({
325327
</Dialog>
326328
</Portal>
327329
</View>
328-
</>
330+
</ThemeProvider>
329331
);
330332
};
331333

0 commit comments

Comments
 (0)