@codecraftkit
Documentation
The theme is a set of configurations to change the default styles of chakra ui.
This config is based on Chakra-ui Theme
it can be imported from the core.
import { theme } from "@codecraftkit/core";
or alone.
import { theme, rawTheme } from "@codecraftkit/theme";
import { theme } from '@codecraftkit/core'class MyApp extends App {render () {const { Component, pageProps } = this.propsreturn <ChakraProvider theme={theme}><Component {...pageProps} /></ChakraProvider>}}
To add more customization options to the chakra theme, in order to extend this theme use rawTheme
rawTheme
is a simple object with the codecraft default styles
import { extendTheme } from '@chakra-ui/react'import { rawTheme } from '@codecraftkit/core'const customStyles = {...rawTheme,components: {...rawTheme?.components,Button: {baseStyle:{bg: 'red'}}},fonts: {...rawTheme?.fonts,heading: "Inter, sans-serif",body: "Inter, sans-serif",},}const theme = extendTheme(customStyles)class MyApp extends App {render () {const { Component, pageProps } = this.propsreturn <ChakraProvider theme={theme}><Component {...pageProps} /></ChakraProvider>}}