“TypeScript React Theme-Provider” Code-Antworten

TypeScript React Theme-Provider

import {} from 'styled-components';
import theme from '../theme';
declare module 'styled-components' {
  type Theme = typeof theme;
  export interface DefaultTheme extends Theme {}
}
Sonya Milyukova

TypeScript React Theme-Provider

// import original module declarations
import 'styled-components';
// and extend them!
declare module 'styled-components' {
  export interface DefaultTheme {
    borderRadius: string;
    colors: {
      main: string;
      secondary: string;
    };
  }
}
Sonya Milyukova

Ähnliche Antworten wie “TypeScript React Theme-Provider”

Fragen ähnlich wie “TypeScript React Theme-Provider”

Weitere verwandte Antworten zu “TypeScript React Theme-Provider” auf TypeScript

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen