Skip to content

Instantly share code, notes, and snippets.

@iremkaraoglu
Last active Mar 4, 2021
Embed
What would you like to do?
import * as React from "react";
import { ColorValue } from "react-native";
import colors from "./colors";
export interface Theme {
primary: ColorValue;
secondary: ColorValue;
// The color for the main background of your interface.
background: ColorValue;
}
export const defaultTheme: Theme = {
primary: colors.brand.blue,
secondary: colors.blue.secondary1,
background: colors.mono.white,
};
export const ThemeContext = React.createContext(defaultTheme);
export function useTheme() {
const theme = React.useContext(ThemeContext);
return theme;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment