import React, { type FC } from 'react'; import { useStore } from 'zustand'; import { useShallow } from 'zustand/react/shallow'; import { cn } from '../utils/cn'; import { getWindowDragHandleClassname } from './const'; import { useWindow } from './ReactWindow'; interface ToggleControlProps { label: string; checked: boolean; onChange: (checked: boolean) => void; } const ToggleControl: FC = ({ label, checked, onChange }) => (
); export const WindowTest = () => { let win = useWindow(); let store = win.store; const { canMaximize, canMinimize, canResize, frameless } = useStore( store, useShallow(({ canMaximize, canMinimize, canResize, frameless }) => { return { canMaximize, canMinimize, canResize, frameless, }; }), ); return (

Window Test

store.setState({ canMaximize: checked })} /> store.setState({ canMinimize: checked })} /> store.setState({ canResize: checked })} /> store.setState({ frameless: checked })} />
H

); };