🎥 Make videos programmatically with React
merge
Jonny Burger66b76055dde5
diff --cc packages/docs/src/remotion/Root.tsxindex 3145648394,5920b7964c..f11349849e--- a/packages/docs/src/remotion/Root.tsx+++ b/packages/docs/src/remotion/Root.tsx@@@ -1,83 -1,70 +1,83 @@@- import { CreateVideoInternals } from "create-video";- import React from "react";- import { Composition, Folder, Still } from "remotion";- import { articles } from "../data/articles";- import { experts } from "../data/experts";- import { AllTemplates } from "./AllTemplates";- import { Article } from "./Article";- import { Expert } from "./Expert";- import { Comp, schema } from "./HomepageVideo/Comp";- import { TemplateComp } from "./Template";+ import {CreateVideoInternals} from 'create-video';+ import React from 'react';-import {Folder, Still} from 'remotion';++import {Composition, Folder, Still} from 'remotion';+ import {articles} from '../data/articles';+ import {experts} from '../data/experts';+ import {AllTemplates} from './AllTemplates';+ import {Article} from './Article';+ import {Expert} from './Expert';++import {Comp, schema} from './HomepageVideo/Comp';+ import {TemplateComp} from './Template';export const RemotionRoot: React.FC = () => {- return (- <>- <Folder name="experts">- {experts.map((e) => {- return (- <Still- key={e.slug}- component={Expert}- defaultProps={{- expertId: e.slug,- }}- height={630}- width={1200}- id={`experts-${e.slug}`}- />- );- })}- </Folder>- <Folder name="articles">- {articles.map((e) => {- return (- <Still- key={e.compId}- component={Article}- defaultProps={{- articleRelativePath: e.relativePath,- }}- height={630}- width={1200}- id={e.compId}- />- );- })}- </Folder>- <Folder name="templates">- {CreateVideoInternals.FEATURED_TEMPLATES.map((e) => {- return (- <Still- key={e.cliId}- component={TemplateComp}- defaultProps={{- templateId: e.cliId,- }}- height={630}- width={1200}- id={`template-${e.cliId}`}- />- );- })}- </Folder>- <Still- component={AllTemplates}- width={1200}- height={630}- id="template-all"- />- <Composition- component={Comp}- id="HomepageVideo"- width={640}- height={360}- durationInFrames={120}- fps={30}- defaultProps={{- theme: "light",- }}- schema={schema}- />- </>- );+ return (+ <>+ <Folder name="experts">+ {experts.map((e) => {+ return (+ <Still+ key={e.slug}+ component={Expert}+ defaultProps={{+ expertId: e.slug,+ }}+ height={630}+ width={1200}+ id={`experts-${e.slug}`}+ />+ );+ })}+ </Folder>+ <Folder name="articles">+ {articles.map((e) => {+ return (+ <Still+ key={e.compId}+ component={Article}+ defaultProps={{+ articleRelativePath: e.relativePath,+ }}+ height={630}+ width={1200}+ id={e.compId}+ />+ );+ })}+ </Folder>+ <Folder name="templates">+ {CreateVideoInternals.FEATURED_TEMPLATES.map((e) => {+ return (+ <Still+ key={e.cliId}+ component={TemplateComp}+ defaultProps={{+ templateId: e.cliId,+ }}+ height={630}+ width={1200}+ id={`template-${e.cliId}`}+ />+ );+ })}+ </Folder>+ <Still+ component={AllTemplates}+ width={1200}+ height={630}+ id="template-all"+ />++ <Composition++ component={Comp}++ id="HomepageVideo"++ width={640}++ height={360}++ durationInFrames={120}++ fps={30}++ defaultProps={{++ theme: 'light',++ }}++ schema={schema}++ />+ </>+ );};