Skip to content

Commit

Permalink
fix(docs): handle dark-mode toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
hyochan committed Feb 8, 2024
1 parent 164befe commit d3347f9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion stories/Common.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,14 @@ export function StoryWrapper({
children: ReactNode;
style: ViewStyle;
}): JSX.Element {
const isDark = useDarkMode();

return (
<DoobooProvider>
<DoobooProvider
themeConfig={{
initialThemeType: isDark ? 'dark' : 'light',
}}
>
<WrapperWeb style={style}>{children}</WrapperWeb>
</DoobooProvider>
);
Expand Down

0 comments on commit d3347f9

Please sign in to comment.