Skip to content

Instantly share code, notes, and snippets.

@flowck
Created September 2, 2022 10:48
Show Gist options
  • Save flowck/2aae1e381fac2292971c33e94a84986a to your computer and use it in GitHub Desktop.
Save flowck/2aae1e381fac2292971c33e94a84986a to your computer and use it in GitHub Desktop.
Adding styled-components theme auto-completion
import { ThemeType } from "./theme";
import "styled-components";
declare module "styled-components" {
export interface DefaultTheme extends ThemeType {}
}
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