Created
September 2, 2022 10:48
-
-
Save firminochangani/2aae1e381fac2292971c33e94a84986a to your computer and use it in GitHub Desktop.
Adding styled-components theme auto-completion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ThemeType } from "./theme"; | |
import "styled-components"; | |
declare module "styled-components" { | |
export interface DefaultTheme extends ThemeType {} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const theme = { | |
fonts: ["..."], | |
sizes: [6, 12, 16, 20] | |
} | |
export type ThemeType = typeof theme; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment