feat(fs.dev): Added theme support
This commit is contained in:
parent
84ffe26a76
commit
e1ecd0cb98
26 changed files with 834 additions and 96 deletions
|
@ -1,28 +1,19 @@
|
|||
import Head from 'next/head'
|
||||
import Image from 'next/image'
|
||||
import Page from 'shared/components/wrappers/page.js'
|
||||
import useApp from 'site/hooks/useApp.js'
|
||||
import ThemePicker from 'shared/components/theme-picker.js'
|
||||
|
||||
export default function Home() {
|
||||
export default (props) => {
|
||||
const app = useApp()
|
||||
return (
|
||||
<div>
|
||||
<Head>
|
||||
<title>Create Next App</title>
|
||||
<meta name="description" content="Generated by create next app" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
|
||||
<main className="px-1">
|
||||
<h1>
|
||||
Welcome to <a href="https://nextjs.org">Next.js!</a>
|
||||
</h1>
|
||||
<button className="btn btn-primary">daisyUI Button</button>
|
||||
|
||||
<p>
|
||||
Get started by editing{' '}
|
||||
<code>pages/index.js</code>
|
||||
</p>
|
||||
|
||||
</main>
|
||||
|
||||
</div>
|
||||
<Page app={app} title='This is not a homepage'>
|
||||
<p className='px-8'>
|
||||
<button
|
||||
className='btn btn-primary'
|
||||
onClick={() => app.theme === 'dark' ? app.setTheme('light') : app.setTheme('dark')}
|
||||
>Toggle</button>
|
||||
</p>
|
||||
<ThemePicker app={app} />
|
||||
</Page>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue