Skip to content

Instantly share code, notes, and snippets.

@firminochangani
Created September 2, 2022 10:48
Show Gist options
  • Save firminochangani/2aae1e381fac2292971c33e94a84986a to your computer and use it in GitHub Desktop.
Save firminochangani/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