🎥 Make videos programmatically with React
Update parameters.md
JonnyBurger4de7e0b06b05
diff --git a/packages/skills/skills/remotion/rules/parameters.md b/packages/skills/skills/remotion/rules/parameters.mdindex ff9d4aef1d..67ea6ab6c7 100644--- a/packages/skills/skills/remotion/rules/parameters.md+++ b/packages/skills/skills/remotion/rules/parameters.md@@ -7,38 +7,38 @@ metadata:To make a video parametrizable, a Zod schema can be added to a composition.-First, `zod` must be installed - it must be exactly version `3.22.2`.+First, `zod` must be installed - it must be exactly version `3.22.3`.Search the project for lockfiles and run the correct command depending on the package manager:If `package-lock.json` is found, use the following command:```bash-npm i [email protected]+npm i [email protected]```If `bun.lockb` is found, use the following command:```bash-bun i [email protected]+bun i [email protected]```If `yarn.lock` is found, use the following command:```bash-yarn add [email protected]+yarn add [email protected]```If `pnpm-lock.yaml` is found, use the following command:```bash-pnpm i [email protected]+pnpm i [email protected]```Then, a Zod schema can be defined alongside the component:```tsx title="src/MyComposition.tsx"-import { z } from "zod";+import {z} from 'zod';export const MyCompositionSchema = z.object({title: z.string(),@@ -56,22 +56,11 @@ const MyComponent: React.FC<z.infer<typeof MyCompositionSchema>> = () => {In the root file, the schema can be passed to the composition:```tsx title="src/Root.tsx"-import { Composition } from "remotion";-import { MyComposition, MyCompositionSchema } from "./MyComposition";+import {Composition} from 'remotion';+import {MyComposition, MyCompositionSchema} from './MyComposition';export const RemotionRoot = () => {- return (- <Composition- id="MyComposition"- component={MyComponent}- durationInFrames={100}- fps={30}- width={1080}- height={1080}- defaultProps={{ title: "Hello World" }}- schema={MyCompositionSchema}- />- );+ return <Composition id="MyComposition" component={MyComponent} durationInFrames={100} fps={30} width={1080} height={1080} defaultProps={{title: 'Hello World'}} schema={MyCompositionSchema} />;};```@@ -97,7 +86,7 @@ pnpm exec remotion add @remotion/zod-types # If project uses pnpmThen import `zColor` from `@remotion/zod-types`:```tsx-import { zColor } from "@remotion/zod-types";+import {zColor} from '@remotion/zod-types';```Then use it in the schema: