Skip to content

Instantly share code, notes, and snippets.

@siisee11
Created March 30, 2021 08:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siisee11/dc4a4f4f0e488a91ab810a1516b0888b to your computer and use it in GitHub Desktop.
Save siisee11/dc4a4f4f0e488a91ab810a1516b0888b to your computer and use it in GitHub Desktop.
global type
import '@react-navigation/native';
// Override the theme in react native navigation to accept our custom theme props.
declare module '@react-navigation/native' {
export type ExtendedTheme = {
dark: boolean;
colors: {
primary: string;
secondary: string;
tertiary: string;
danger: string;
background: string;
card: string;
text: string;
subtext: string;
separator: string;
border: string;
highlight: string;
gray: string;
topgrad: string;
white: string;
black: string;
error: string;
notification: string;
};
};
export function useTheme(): ExtendedTheme;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment