Closed thiagomdo1 closed 2 years ago
Same for me, if you do not export the types, we cannot do this :
const theme = {
...defaultTheme,
components: {
...defaultTheme.components,
Button: {
}
}
If you need a workaround for now, you can create a evergreen.d.ts
in your src folder, and use this:
import 'evergreen-ui';
import { YourCustomThemeType } from './types/evergreen-theme';
declare module 'evergreen-ui' {
export interface Theme extends CustomTheme {
}
}
Personally I've created a theme by console.logging the default theme and then using a json to typescript converter, and just editing some parts. It's better than nothing for now
For anyone following this issue, v6.7.0 provides a strongly typed DefaultTheme
interface that should help 😄
Hi. I'm getting a Typescript error for defaultTheme props: Property 'fontSizes' does not exist on type '{}'. TS2339
It seems the problem is in the index.d.ts file:
My version: 6.0.1