Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";
import type { AlertDialogState } from "@/registry/remocn-ui/alert-dialog";
const DEFAULT_DESCRIPTION =
"This action cannot be undone. This will permanently remove your data from our servers.";
export const alertDialogConfig: ComponentConfig = {
componentName: "AlertDialog",
importPath: "@/components/remocn/alert-dialog",
controls: {
title: {
type: "text-content",
default: "Delete account?",
description: "Title",
},
description: {
type: "text-content",
default:
"This action cannot be undone. This will permanently remove your data from our servers.",
description: "Description",
},
actionLabel: {
type: "text-content",
default: "Delete",
description: "Action Label",
},
cancelLabel: {
type: "text-content",
default: "Cancel",
description: "Cancel Label",
},
state: {
type: "enum",
default: "opened",
variants: {
opened: {},
closed: {},
},
description: "State",
},
},
durationInFrames: 120,
fps: FPS,
compositionWidth: W,
compositionHeight: H,
previewBackdrop: { type: "color", value: "oklch(1 0 0)" },
snippet: (values) => {
const state = (values.state as AlertDialogState) ?? "opened";
const title = values.title as string | undefined;
const description = values.description as string | undefined;
const actionLabel = values.actionLabel as string | undefined;
const cancelLabel = values.cancelLabel as string | undefined;
const props: string[] = [` state="${state}"`];
if (title !== undefined && title !== "Delete account?")
props.push(` title="${title}"`);
if (description !== undefined && description !== DEFAULT_DESCRIPTION)
props.push(` description="${description}"`);
if (actionLabel !== undefined && actionLabel !== "Delete")
props.push(` actionLabel="${actionLabel}"`);
if (cancelLabel !== undefined && cancelLabel !== "Cancel")
props.push(` cancelLabel="${cancelLabel}"`);
return `import { AlertDialog } from "@/components/remocn/alert-dialog";
<AlertDialog
${props.join("\n")}
/>`;
},
};