@ubie/chakra-ui-theme
Chakra UI custom theme generated from @ubie/design-tokens
Usage
- Install the package
npm i @ubie/chakra-ui-theme
- Register to Chakra UI
import { ChakraProvider, extendTheme } from "@chakra-ui/react";
import ubieTheme from "@ubie/chakra-ui-theme";
const theme = extendTheme(
{
},
ubieTheme
);
const App = () => {
return <ChakraProvider theme={theme}>{/** ... */}</ChakraProvider>;
};
- Now you can use ubie colors
<Box textColor="blue.500">Ubie blue</Box>
<Box textColor="accent">Accent color, same to pink.500</Box>
FAQ
Got Cannot find module its corresponding type
error on TypeScript
Enable resolveJsonModule
option in your tsconfig.
{
"compilerOptions": {
...
"resolveJsonModule": true
}
}