Skip to content

Commit bf79287

Browse files
committed
fix: add theme support in expo messaging app
1 parent b0a566f commit bf79287

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

examples/ExpoMessaging/components/ChatWrapper.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { AuthProgressLoader } from './AuthProgressLoader';
1010
import { StreamChatGenerics } from '../types';
1111
import { STREAM_API_KEY, user, userToken } from '../constants';
1212
import { useSafeAreaInsets } from 'react-native-safe-area-context';
13+
import { useStreamChatTheme } from '../useStreamChatTheme';
1314

1415
const streami18n = new Streami18n({
1516
language: 'en',
@@ -26,13 +27,18 @@ export const ChatWrapper = ({ children }: PropsWithChildren<{}>) => {
2627
userData: user,
2728
tokenOrProvider: userToken,
2829
});
30+
const theme = useStreamChatTheme();
2931

3032
if (!chatClient) {
3133
return <AuthProgressLoader />;
3234
}
3335

3436
return (
35-
<OverlayProvider<StreamChatGenerics> bottomInset={bottom} i18nInstance={streami18n}>
37+
<OverlayProvider<StreamChatGenerics>
38+
bottomInset={bottom}
39+
i18nInstance={streami18n}
40+
value={{ style: theme }}
41+
>
3642
<Chat client={chatClient} i18nInstance={streami18n}>
3743
{children}
3844
</Chat>

0 commit comments

Comments
 (0)