Skip to content

🎥 Make videos programmatically with React

@remotion/example: Add 100-country enum to schema-test for Studio dropdown testing

Jonny Burgercd8b06dedd40
diff --git a/packages/example/src/Root.tsx b/packages/example/src/Root.tsx
index e7c6d3c46e..a2a92c4f21 100644
--- a/packages/example/src/Root.tsx
+++ b/packages/example/src/Root.tsx
@@ -1505,6 +1505,7 @@ export const Index: React.FC = () => {
list: [{name: 'first', age: 12}],
matrix: [0, 1, 1, 0] as const,
description: 'Sample description \nOn multiple lines',
+ country: 'Armenia' as const,
dropdown: 'a' as const,
superSchema: [
{type: 'a' as const, a: {a: 'hi'}},
diff --git a/packages/example/src/SchemaTest/index.tsx b/packages/example/src/SchemaTest/index.tsx
index 70e9018443..aa5b8bacd2 100644
--- a/packages/example/src/SchemaTest/index.tsx
+++ b/packages/example/src/SchemaTest/index.tsx
@@ -3,6 +3,109 @@ import React from 'react';
import {AbsoluteFill, Sequence} from 'remotion';
import {z} from 'zod';
+const COUNTRY_NAMES = [
+ 'Afghanistan',
+ 'Albania',
+ 'Algeria',
+ 'Andorra',
+ 'Angola',
+ 'Argentina',
+ 'Armenia',
+ 'Australia',
+ 'Austria',
+ 'Azerbaijan',
+ 'Bahamas',
+ 'Bahrain',
+ 'Bangladesh',
+ 'Barbados',
+ 'Belarus',
+ 'Belgium',
+ 'Belize',
+ 'Benin',
+ 'Bhutan',
+ 'Bolivia',
+ 'Bosnia and Herzegovina',
+ 'Botswana',
+ 'Brazil',
+ 'Brunei',
+ 'Bulgaria',
+ 'Burkina Faso',
+ 'Burundi',
+ 'Cambodia',
+ 'Cameroon',
+ 'Canada',
+ 'Cape Verde',
+ 'Chad',
+ 'Chile',
+ 'China',
+ 'Colombia',
+ 'Costa Rica',
+ 'Croatia',
+ 'Cuba',
+ 'Cyprus',
+ 'Czech Republic',
+ 'Denmark',
+ 'Djibouti',
+ 'Dominican Republic',
+ 'Ecuador',
+ 'Egypt',
+ 'El Salvador',
+ 'Estonia',
+ 'Ethiopia',
+ 'Fiji',
+ 'Finland',
+ 'France',
+ 'Gabon',
+ 'Gambia',
+ 'Georgia',
+ 'Germany',
+ 'Ghana',
+ 'Greece',
+ 'Guatemala',
+ 'Guinea',
+ 'Haiti',
+ 'Honduras',
+ 'Hungary',
+ 'Iceland',
+ 'India',
+ 'Indonesia',
+ 'Iran',
+ 'Iraq',
+ 'Ireland',
+ 'Israel',
+ 'Italy',
+ 'Jamaica',
+ 'Japan',
+ 'Jordan',
+ 'Kazakhstan',
+ 'Kenya',
+ 'Kuwait',
+ 'Kyrgyzstan',
+ 'Laos',
+ 'Latvia',
+ 'Lebanon',
+ 'Lesotho',
+ 'Liberia',
+ 'Libya',
+ 'Liechtenstein',
+ 'Lithuania',
+ 'Luxembourg',
+ 'Madagascar',
+ 'Malawi',
+ 'Malaysia',
+ 'Maldives',
+ 'Mali',
+ 'Malta',
+ 'Mauritania',
+ 'Mauritius',
+ 'Mexico',
+ 'Moldova',
+ 'Monaco',
+ 'Mongolia',
+ 'Montenegro',
+ 'Morocco',
+] as const;
+
export const schemaTestSchema = z.object({
title: z.string().nullable(),
delay: z.number().min(0).max(1000).step(0.1),
@@ -10,6 +113,7 @@ export const schemaTestSchema = z.object({
matrix: zMatrix(),
list: z.array(z.object({name: z.string(), age: z.number()})),
description: zTextarea().nullable(),
+ country: z.enum(COUNTRY_NAMES),
dropdown: z.enum(['a', 'b', 'c']),
superSchema: z.array(
z.discriminatedUnion('type', [
@@ -41,6 +145,7 @@ export const SchemaTest: React.FC<z.infer<typeof schemaTestSchema>> = ({
color,
list,
description,
+ country,
}) => {
return (
<AbsoluteFill
@@ -62,6 +167,8 @@ export const SchemaTest: React.FC<z.infer<typeof schemaTestSchema>> = ({
</ul>
<p style={{whiteSpace: 'pre-line', color}}>{description}</p>
+
+ <p style={{fontSize: 36, color: '#888', marginTop: 24}}>{country}</p>
</Sequence>
</AbsoluteFill>
);