🎥 Make videos programmatically with React
json layout
Patric Salvisbergfd465ac07be2
diff --git a/packages/cli/src/editor/components/Preview.tsx b/packages/cli/src/editor/components/Preview.tsxindex deaf313b8d..00889709ac 100644--- a/packages/cli/src/editor/components/Preview.tsx+++ b/packages/cli/src/editor/components/Preview.tsx@@ -18,6 +18,11 @@ type AssetResolution = {height: number;};+const style: React.CSSProperties = {+ fontFamily: 'monospace',+ flex: 1,+};+type AssetFileType = 'audio' | 'video' | 'image' | 'json' | 'other';const getFileType = (fileName: string | null): AssetFileType => {if (!fileName) {@@ -122,6 +127,7 @@ const AssetComponent: React.FC<{currentAsset: string | null}> = ({onChange={() => {return null;}}+ style={style}/>);}@@ -168,6 +174,11 @@ const Inner: React.FC<{img.src = assetSrc;}+ // TODO: Better calculation for json+ if (currentAssetType === 'json') {+ setAssetResolution({width: 600, height: 600});+ }+return null;};