Answers for "typescript react theme-provider"

0

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 {}
}
Posted by: Guest on March-16-2022
0

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;
    };
  }
}
Posted by: Guest on March-16-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language