How Do I Preserve The Styling Of H2, H3, Etc? Problem ... - GitHub
-
| Well, the solution was quite simple. All I had to do was to configure the theme file and pass it onto ChakraProvider. For anyone struggling with this, here's the code: import { extendTheme } from "@chakra-ui/react"; export const theme = extendTheme({ fonts: { heading: 'Roboto', body: 'Roboto' }, styles: { global: { body: { bg: 'gray.50', color: 'gray.900', }, h2: { fontSize: '2xl', fontWeight: 'bold', }, h3: { fontSize: 'lg' }, h4: { fontSize: 'md' } } } });Then wrap it around your app like this: import { theme } from '../styles/theme'; function MyApp({ Component, pageProps }: AppProps) { return ( <ChakraProvider theme={theme}> <Component {...pageProps} /> </ChakraProvider> ); }Also, this doc was helpful. |
Beta Was this translation helpful? Give feedback.
Từ khóa » H1 Chakra Ui
-
Heading - Chakra UI
-
Chakra Factory
-
Text Style Not Applying Unless Property Is Defined #3612 - GitHub
-
Advanced Techniques In Chakra UI - LogRocket Blog
-
Chakra UI For React - All You Need To Know - KnowledgeHut
-
Choc UI: Chakra UI Prebuilt Components
-
Chakra-ui-markdown-renderer - Npm
-
Chakra Prose Is Finally Here - James Perkins
-
Chakra UI Test - StackBlitz
-
Chakra Ui Button Not Rendering - Stack Overflow
-
Alignment Is Not Proper In Next.js Using Chakra UI - Stack Overflow
-
@chakra-ui/system NPM
-
Heading - Vision UI Dashboard - Creative Tim
-
@chakra-ui/portal - Npm Package Health Analysis | Snyk