mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: migrate settins
This commit is contained in:
1 parent
746dd998aa
commit
dc37b23727
39 files changed
+44
-2297
No files matched your search
@@ -0,0 +1,8 @@
|
||||
---
|
||||
import { Page } from '.';
|
||||
import RootLayout from '../../layouts/RootLayout.astro';
|
||||
---
|
||||
|
||||
<RootLayout>
|
||||
<Page client:load />
|
||||
</RootLayout>
|
||||
@@ -0,0 +1,36 @@
|
||||
import { Flex, Heading, Switch, Text } from '@radix-ui/themes';
|
||||
import { PageWrapper } from '../../components/PageWrapper';
|
||||
import { App } from '../../stores/app';
|
||||
|
||||
export function Page() {
|
||||
return (
|
||||
<App.Provider>
|
||||
<Content />
|
||||
</App.Provider>
|
||||
);
|
||||
}
|
||||
|
||||
function Content() {
|
||||
const developerMode = App.useDeferred((state) => state.developerMode, false);
|
||||
const appStore = App.useStore();
|
||||
|
||||
return (
|
||||
<PageWrapper justify="center" align="center">
|
||||
<Flex direction="column" gap="4">
|
||||
<Flex gap="3" direction="column">
|
||||
<Heading size="5">Advanced</Heading>
|
||||
|
||||
<Flex align="center" gap="2">
|
||||
<Text>Developer mode</Text>
|
||||
<Switch
|
||||
checked={developerMode}
|
||||
onCheckedChange={(checked) =>
|
||||
appStore.setState({ developerMode: checked })
|
||||
}
|
||||
/>
|
||||
</Flex>
|
||||
</Flex>
|
||||
</Flex>
|
||||
</PageWrapper>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user