Skip to content

Commit

Permalink
fix: pass theme along to all components
Browse files Browse the repository at this point in the history
  • Loading branch information
Thodor12 committed Apr 6, 2023
1 parent 0825e3b commit b4d3e1c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/module/paperSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ import type {
PaperSelectProps,
PaperSelectTextInputProps,
} from '../interface/paperSelect.interface';
import { useInternalTheme } from 'react-native-paper/lib/typescript/src/core/theming';
import {
ThemeProvider,
useInternalTheme,
} from 'react-native-paper/lib/typescript/src/core/theming';

const PaperSelect = ({
// Required props
Expand Down Expand Up @@ -229,7 +232,7 @@ const PaperSelect = ({
};

return (
<>
<ThemeProvider theme={theme}>
<View style={[styles.container, containerStyle]}>
<TextInput
{...textInputProps}
Expand All @@ -248,7 +251,6 @@ const PaperSelect = ({
icon="chevron-down"
/>
}
theme={theme}
/>
{errorText ? (
<Text
Expand Down Expand Up @@ -325,7 +327,7 @@ const PaperSelect = ({
</Dialog>
</Portal>
</View>
</>
</ThemeProvider>
);
};

Expand Down

0 comments on commit b4d3e1c

Please sign in to comment.