Skip to content

Commit

Permalink
Merge pull request #6 from damla/dev
Browse files Browse the repository at this point in the history
[#5] refactor: theme file
  • Loading branch information
emrecgty committed May 8, 2021
2 parents eff4375 + 9492d7a commit 9535ec0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
9 changes: 1 addition & 8 deletions pages/_app.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
import { ChakraProvider } from "@chakra-ui/react";
import { extendTheme } from "@chakra-ui/react";

const config = {
initialColorMode: "light",
useSystemColorMode: false,
};

export const theme = extendTheme({ config });
import theme from "../utils/theme";

function MyApp({ Component, pageProps }) {
return (
Expand Down
2 changes: 1 addition & 1 deletion pages/_document.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { ColorModeScript } from "@chakra-ui/react";
import NextDocument, { Html, Head, Main, NextScript } from "next/document";
import { theme } from "./_app";
import theme from "../utils/theme";

export default class Document extends NextDocument {
render() {
Expand Down
2 changes: 1 addition & 1 deletion pages/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, ButtonGroup, Stack, useColorMode } from "@chakra-ui/react";
import { Button, useColorMode } from "@chakra-ui/react";

export default function IndexPage() {
const { colorMode, toggleColorMode } = useColorMode();
Expand Down
10 changes: 10 additions & 0 deletions utils/theme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { extendTheme } from "@chakra-ui/react";

const config = {
initialColorMode: "light",
useSystemColorMode: false,
};

const theme = extendTheme({ config });

export default theme;

1 comment on commit 9535ec0

@vercel
Copy link

@vercel vercel bot commented on 9535ec0 May 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.