diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 2ab8410..2e39452 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -2,9 +2,8 @@ import React from 'react' import App from 'next/app' import ThemeProvider from '@chakra-ui/core/dist/ThemeProvider' import CSSReset, { CSSResetProps } from '@chakra-ui/core/dist/CSSReset' -import type { ITheme } from '@chakra-ui/core/dist/theme' import { Global, css, SerializedStyles } from '@emotion/core' -import { defaultTheme } from '../ui/theme' +import { defaultTheme, Theme } from '../ui/theme' type GetGlobalConfig = Required['config'] @@ -32,7 +31,7 @@ const defaultGlobalCss = css` // -- export interface AppTraits { - theme?: ITheme + theme?: Theme getGlobalConfig?: CSSResetProps['config'] globalCss?: SerializedStyles Providers?: React.FunctionComponent diff --git a/src/ui/theme.ts b/src/ui/theme.ts index 4556867..7480ec7 100644 --- a/src/ui/theme.ts +++ b/src/ui/theme.ts @@ -1,8 +1,15 @@ -import chakraTheme, { ITheme } from '@chakra-ui/core/dist/theme' +import chakraTheme, { ITheme, ColorHues } from '@chakra-ui/core/dist/theme' import { tailwindColors } from './colors' import { systemFontStack, systemMonoFontStack } from './fonts' -export const defaultTheme: ITheme = { +export interface Theme extends ITheme { + colors: ITheme['colors'] & { + // Custom colors hues + indigo: ColorHues + } +} + +export const defaultTheme: Theme = { ...chakraTheme, fonts: { ...chakraTheme.fonts,