Create polished demo videos without editing skills. Mac/Windows/Linux
empty shadow switch
Siddharth5eaa43c247fa
diff --git a/package-lock.json b/package-lock.jsonindex 571a253d..13270917 100644--- a/package-lock.json+++ b/package-lock.json@@ -10,6 +10,7 @@"dependencies": {"@fix-webm-duration/fix": "^1.0.1","@radix-ui/react-slot": "^1.2.3",+ "@radix-ui/react-switch": "^1.2.6","@radix-ui/react-tabs": "^1.1.13","class-variance-authority": "^0.7.1","clsx": "^2.1.1",@@ -1708,6 +1709,35 @@}}},+ "node_modules/@radix-ui/react-switch": {+ "version": "1.2.6",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-switch/-/react-switch-1.2.6.tgz",+ "integrity": "sha512-bByzr1+ep1zk4VubeEVViV592vu2lHE2BZY5OnzehZqOOgogN80+mNtCqPkhn2gklJqOpxWgPoYTSnhBCqpOXQ==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-use-controllable-state": "1.2.2",+ "@radix-ui/react-use-previous": "1.1.1",+ "@radix-ui/react-use-size": "1.1.1"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },"node_modules/@radix-ui/react-tabs": {"version": "1.1.13","resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.1.13.tgz",@@ -1805,6 +1835,39 @@}}},+ "node_modules/@radix-ui/react-use-previous": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.1.1.tgz",+ "integrity": "sha512-2dHfToCj/pzca2Ck724OZ5L0EVrr3eHRNsG/b3xQJLA2hZpVCS99bLAX+hm1IHXDEnzU6by5z/5MIY794/a8NQ==",+ "license": "MIT",+ "peerDependencies": {+ "@types/react": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-use-size": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.1.tgz",+ "integrity": "sha512-ewrXRDTAqAXlkl6t/fkXWNAhFX9I+CkKlw6zjEwk86RSPKwZr3xpBRso655aqYafwtnbpHLj6toFzmd6xdVptQ==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/react-use-layout-effect": "1.1.1"+ },+ "peerDependencies": {+ "@types/react": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ }+ }+ },"node_modules/@rolldown/pluginutils": {"version": "1.0.0-beta.27","resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz",diff --git a/package.json b/package.jsonindex 5510882c..d8d90cf4 100644--- a/package.json+++ b/package.json@@ -12,6 +12,7 @@"dependencies": {"@fix-webm-duration/fix": "^1.0.1","@radix-ui/react-slot": "^1.2.3",+ "@radix-ui/react-switch": "^1.2.6","@radix-ui/react-tabs": "^1.1.13","class-variance-authority": "^0.7.1","clsx": "^2.1.1",diff --git a/src/components/ui/switch.tsx b/src/components/ui/switch.tsxnew file mode 100644index 00000000..455c23b6--- /dev/null+++ b/src/components/ui/switch.tsx@@ -0,0 +1,27 @@+import * as React from "react"+import * as SwitchPrimitives from "@radix-ui/react-switch"++import { cn } from "@/lib/utils"++const Switch = React.forwardRef<+ React.ElementRef<typeof SwitchPrimitives.Root>,+ React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>+>(({ className, ...props }, ref) => (+ <SwitchPrimitives.Root+ className={cn(+ "peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",+ className+ )}+ {...props}+ ref={ref}+ >+ <SwitchPrimitives.Thumb+ className={cn(+ "pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"+ )}+ />+ </SwitchPrimitives.Root>+))+Switch.displayName = SwitchPrimitives.Root.displayName++export { Switch }diff --git a/src/components/video-editor/SettingsPanel.tsx b/src/components/video-editor/SettingsPanel.tsxindex 89603d7a..85cbe578 100644--- a/src/components/video-editor/SettingsPanel.tsx+++ b/src/components/video-editor/SettingsPanel.tsx@@ -1,11 +1,25 @@import { cn } from "@/lib/utils";+import { Switch } from "@/components/ui/switch";const WALLPAPER_COUNT = 12;const WALLPAPER_PATHS = Array.from({ length: WALLPAPER_COUNT }, (_, i) => `/wallpapers/wallpaper${i + 1}.jpg`);-export default function SettingsPanel({ selected, onWallpaperChange }: { selected: string, onWallpaperChange: (path: string) => void }) {+interface SettingsPanelProps {+ selected: string;+ onWallpaperChange: (path: string) => void;+ shadowEnabled: boolean;+ onShadowChange: (enabled: boolean) => void;+}++export default function SettingsPanel({ selected, onWallpaperChange, shadowEnabled, onShadowChange }: SettingsPanelProps) {return (<div className="flex-[3] min-w-0 bg-card border border-border rounded-xl p-8 flex flex-col shadow-sm">+ <div className="mb-6">+ <div className="flex items-center gap-2 mb-4">+ <Switch checked={shadowEnabled} onCheckedChange={onShadowChange} />+ <div className="text-sm">Shadow</div>+ </div>+ </div><div className="mb-6"><div className="text-lg mb-2">Choose Background</div><div className="grid grid-cols-6 gap-3">