Type-ified styled components themes

This commit is contained in:
Dustin Brett 2021-01-23 21:42:55 -08:00
parent 349555b720
commit dc62e6c395
2 changed files with 11 additions and 6 deletions

9
styles/styled.d.ts vendored Normal file
View File

@ -0,0 +1,9 @@
import 'styled-components';
declare module 'styled-components' {
export interface DefaultTheme {
colors: {
primary: string;
};
}
}

View File

@ -1,9 +1,5 @@
export type Theme = {
colors: {
primary: string;
};
};
import type { DefaultTheme } from 'styled-components';
export type StyledAppProps = {
theme?: Theme;
theme?: DefaultTheme;
};