diff --git a/components/animate/AnimationEditor.tsx b/components/animate/AnimationEditor.tsx index 43afb69..246a49c 100644 --- a/components/animate/AnimationEditor.tsx +++ b/components/animate/AnimationEditor.tsx @@ -12,7 +12,7 @@ import { cn } from '@/lib/utils/cn'; import type { AnimationConfig, KeyframeProperties as KFProps, PreviewElement } from '@/types/animate'; type MobileTab = 'edit' | 'preview'; -type RightTab = 'export' | 'presets'; +type RightTab = 'keyframes' | 'export' | 'presets'; export function AnimationEditor() { const [config, setConfig] = useState(DEFAULT_CONFIG); @@ -21,7 +21,7 @@ export function AnimationEditor() { ); const [previewElement, setPreviewElement] = useState('box'); const [mobileTab, setMobileTab] = useState('edit'); - const [rightTab, setRightTab] = useState('export'); + const [rightTab, setRightTab] = useState('keyframes'); const selectedKeyframe = config.keyframes.find((k) => k.id === selectedId) ?? null; @@ -108,33 +108,22 @@ export function AnimationEditor() {
- {/* Timeline — embedded inside edit panel on mobile, hidden on desktop */} -
- -
-
-
- {/* Right: Preview + Timeline + Export/Presets */} + {/* Right: Preview + tabbed panel */}
{/* Preview canvas */} - {/* Timeline — standalone on desktop */} -
- -
- - {/* Export / Presets tab panel */} + {/* Keyframes / Export / Presets tab panel */}
{/* Tab switcher */}
- {(['export', 'presets'] as RightTab[]).map((t) => ( + {(['keyframes', 'export', 'presets'] as RightTab[]).map((t) => ( ))}
{/* Content */}
+ {rightTab === 'keyframes' && } {rightTab === 'export' && } {rightTab === 'presets' && }