theme
This commit is contained in:
15
src/App.tsx
15
src/App.tsx
@@ -35,8 +35,7 @@ import {
|
||||
ContextMenuGroup
|
||||
} from "@/components/ui/context-menu"
|
||||
import { AppMenubar } from '@/components/AppMenubar'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { ClipboardPaste, Code2, Moon, ScrollText, Sparkles, Sun, Variable } from 'lucide-react'
|
||||
import { ClipboardPaste, Code2, ScrollText, Sparkles, Variable } from 'lucide-react'
|
||||
import { DEFAULT_NODE_STYLE, getDefaultDataForType, getNextNodeId } from './lib/flowUtils'
|
||||
|
||||
const SNAP_GRID: [number, number] = [15, 15]
|
||||
@@ -69,7 +68,7 @@ const initialEdges: Edge[] = [
|
||||
const PROJECT_FILE_EXT = '.zui.json'
|
||||
|
||||
export default function App() {
|
||||
const { theme, toggleTheme } = useTheme()
|
||||
const { theme } = useTheme()
|
||||
const {
|
||||
nodes,
|
||||
edges,
|
||||
@@ -378,16 +377,6 @@ export default function App() {
|
||||
canRedo={canRedo}
|
||||
/>
|
||||
<div className="flex-1 min-h-0 relative flex flex-col">
|
||||
<Button
|
||||
variant="outline"
|
||||
size="icon"
|
||||
className="absolute top-3 right-3 z-10 nodrag nopan"
|
||||
onClick={toggleTheme}
|
||||
title={theme === 'dark' ? 'Switch to light mode' : 'Switch to dark mode'}
|
||||
aria-label={theme === 'dark' ? 'Switch to light mode' : 'Switch to dark mode'}
|
||||
>
|
||||
{theme === 'dark' ? <Sun className="h-4 w-4" /> : <Moon className="h-4 w-4" />}
|
||||
</Button>
|
||||
<div className="flex-1 min-h-0 flex flex-col">
|
||||
<FlowContext.Provider value={flowContextValue}>
|
||||
<ContextMenu>
|
||||
|
||||
Reference in New Issue
Block a user