import type { ReactNode } from 'react' import { motion } from 'motion/react' import { IconMinus, IconPlus } from '@tabler/icons-react' import { cn } from '@/client/lib/cn' import { Button } from '@/client/components/ui/button' import { useWorkspaceThemeSetting } from '@/client/features/workspace/workspace-layout-context' import { getWorkspaceThemeStyle } from '@/client/runtime/workspace-theme' import { isDefaultWidget } from '@/lib/default-widgets' type WidgetFrameProps = { customizing?: boolean hidden?: boolean widgetId?: string onRemove?: () => void children?: ReactNode } export function WidgetFrame({ customizing, hidden, widgetId, onRemove, children }: WidgetFrameProps) { const theme = useWorkspaceThemeSetting() const vivid = !widgetId || !isDefaultWidget(widgetId) return (
{children}
{customizing && onRemove && (
)}
) }