From 2454d9701c1e012d1470d2a5aa53b769cb3d72c7 Mon Sep 17 00:00:00 2001 From: Fakhri Imaduddin Date: Tue, 8 Aug 2023 23:28:32 +0700 Subject: [PATCH] feat: add theme object to chakra provider --- src/pages/_app.tsx | 4 +++- src/theme/index.ts | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 src/theme/index.ts diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 99cd912..48201b5 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -4,6 +4,8 @@ import type { AppProps } from 'next/app'; import Head from 'next/head'; import { GoogleAnalytics } from 'nextjs-google-analytics'; +import { theme } from '../theme'; + const GA_TRACKING_ID = process.env.NEXT_PUBLIC_GA_TRACKING_ID || ''; function MyApp({ Component, pageProps }: AppProps) { @@ -13,7 +15,7 @@ function MyApp({ Component, pageProps }: AppProps) { Mocha Bot - + diff --git a/src/theme/index.ts b/src/theme/index.ts new file mode 100644 index 0000000..0065912 --- /dev/null +++ b/src/theme/index.ts @@ -0,0 +1,7 @@ +// 1. Import `extendTheme` +import { extendTheme } from '@chakra-ui/react'; + +// 2. Call `extendTheme` and pass your custom values +const theme = extendTheme({}); + +export { theme };