Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/crutchcorn/react-native-monorepo-example. An example of a Yarn Berry monorepo with workspace and Re
Something went wrong. Try again.
123456789101112import { PropsWithChildren } from "react";import { useColorScheme } from "react-native";import { ThemeProvider as StyledThemeProvider } from "styled-components";import { dark, light } from "../constants";
export const ThemeProvider = ({ children }: PropsWithChildren) => { const isDarkMode = useColorScheme() === "dark";
const theme = isDarkMode ? dark : light; return <StyledThemeProvider theme={theme}>{children}</StyledThemeProvider>;};