Skip to content

Instantly share code, notes, and snippets.

@iremkaraoglu
Last active March 4, 2021 15:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iremkaraoglu/49b4eef4cfb771398d112700d5cb0f7f to your computer and use it in GitHub Desktop.
Save iremkaraoglu/49b4eef4cfb771398d112700d5cb0f7f to your computer and use it in GitHub Desktop.
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