This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Node.js CI | |
| on: [push] | |
| jobs: | |
| build: | |
| runs-on: self-hosted | |
| strategy: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const withPWA = require('next-pwa') | |
| module.exports = withPWA({ | |
| pwa: { | |
| dest: 'public' | |
| } | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const light = { | |
| bg: 'white', | |
| fontColor: 'purple' | |
| } | |
| const dark = { | |
| bg: 'black', | |
| fontColor: 'white' | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState, useEffect } from 'react' | |
| import useDarkMode from 'use-dark-mode' | |
| import { ThemeProvider } from 'styled-components' | |
| import { lightTheme, darkTheme } from '../theme' | |
| const MyApp = ({ Component, pageProps }) => { | |
| const [isMounted, setIsMounted] = useState(false) | |
| const darkMode = useDarkMode(true) | |
| const theme = darkMode.value ? darkTheme : lightTheme |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react' | |
| import Button from '../components/Button' | |
| const Home = () => { | |
| return <Button>Theme Test</Button> | |
| } | |
| export default Home |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react' | |
| import { | |
| ThemeProvider, | |
| theme, | |
| ColorModeProvider, | |
| CSSReset, | |
| Box, | |
| Flex, | |
| IconButton, | |
| useColorMode, |