🎥 Make videos programmatically with React
nice
JonnyBurger9c0776832243
diff --git a/packages/design/src/CheckIcon.tsx b/packages/design/src/CheckIcon.tsxnew file mode 100644index 0000000000..92e8516630--- /dev/null+++ b/packages/design/src/CheckIcon.tsx@@ -0,0 +1,19 @@+import React from 'react';++const d =+ 'M143.056 81.4934C147.25 77.2994 147.25 70.4506 143.056 66.2566C138.862 62.0627 132.013 62.0627 127.819 66.2566L86.1875 107.888L69.1809 90.8816C64.9869 86.6877 58.1381 86.6877 53.9441 90.8816C49.7502 95.0756 49.7502 101.924 53.9441 106.118L78.5691 130.743C82.7631 134.937 89.6119 134.937 93.8059 130.743L143.056 81.4934Z';++export const CheckIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => {+ return (+ <svg+ {...props}+ viewBox={+ '50.79867500000001 63.11117499999997 95.40282500000015 70.77732499999999'+ }+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ >+ <path d={d} fill="currentcolor" />+ </svg>+ );+};diff --git a/packages/design/src/Counter.tsx b/packages/design/src/Counter.tsxindex bfad3406d8..e6287a4989 100644--- a/packages/design/src/Counter.tsx+++ b/packages/design/src/Counter.tsx@@ -34,7 +34,6 @@ const container: React.CSSProperties = {const buttonContainer: React.CSSProperties = {display: 'flex',width: 30,- padding: 2,height: 20,justifyContent: 'center',alignItems: 'center',@@ -97,7 +96,7 @@ export const Counter: React.FC<CounterProps> = ({<div className="flex flex-col h-full"><buttontype="button"- className="border-0 flex-1 border-text border-b-[var(--box-stroke)] border-l-[var(--box-stroke)] bg-transparent"+ className="border-0 flex-1 p-0 pt-[5px] bg-transparent"style={{...buttonContainer,}}@@ -107,7 +106,7 @@ export const Counter: React.FC<CounterProps> = ({</button><buttontype="button"- className="border-0 flex-1 border-text border-l-[var(--box-stroke)] bg-transparent"+ className="border-0 flex-1 p-0 bg-transparent pb-[5px] pl-[1px]"style={{...buttonContainer,}}diff --git a/packages/design/src/PaperPlaneIcon.tsx b/packages/design/src/PaperPlaneIcon.tsxnew file mode 100644index 0000000000..884ec8cca6--- /dev/null+++ b/packages/design/src/PaperPlaneIcon.tsx@@ -0,0 +1,14 @@+import React from 'react';++export const PlanePaperIcon: React.FC<React.SVGProps<SVGSVGElement>> = (+ props,+) => {+ return (+ <svg xmlns="http://www.w3.org/2000/svg" {...props} viewBox="0 0 576 512">+ <path+ fill="currentcolor"+ d="M169.9 280L94.9 448.6 461.2 280 169.9 280zm291.3-48L94.9 63.4 169.9 232 461.2 232zM34.8 465.6L128 256 34.8 46.4C33 42.2 32 37.6 32 33 32 14.8 46.7 0 64.8 0 69.5 0 74.2 1 78.5 3L554.2 222c13.3 6.1 21.8 19.4 21.8 34s-8.5 27.9-21.8 34L78.5 509c-4.3 2-9 3-13.7 3-18.1 0-32.8-14.8-32.8-33 0-4.6 1-9.2 2.8-13.4z"+ />+ </svg>+ );+};diff --git a/packages/design/src/index.ts b/packages/design/src/index.tsindex e5e734f0f4..781c573c4c 100644--- a/packages/design/src/index.ts+++ b/packages/design/src/index.ts@@ -1,4 +1,6 @@export {Button} from './Button';export {Card} from './Card';+export {CheckIcon} from './CheckIcon';export {Counter} from './Counter';+export {PlanePaperIcon} from './PaperPlaneIcon';export {Switch} from './Switch';diff --git a/packages/promo-pages/src/components/design.tsx b/packages/promo-pages/src/components/design.tsxindex ed3d25f491..68d1d96694 100644--- a/packages/promo-pages/src/components/design.tsx+++ b/packages/promo-pages/src/components/design.tsx@@ -62,7 +62,7 @@ export const DesignPage: React.FC = () => {<Switch active={active} onToggle={() => setActive((e) => !e)} /><br /> <h2 className="text-brand"><Card /></h2><Card className="px-4 py-4">- <h3 className="text-black">Card</h3>+ <h3 className="text-text">Card</h3><div className="text-gray-500">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed doeiusmod tempor incididunt ut labore et dolore magna aliqua.diff --git a/packages/promo-pages/src/components/homepage/NewsletterButton.tsx b/packages/promo-pages/src/components/homepage/NewsletterButton.tsxindex 24293e4312..55a4f16299 100644--- a/packages/promo-pages/src/components/homepage/NewsletterButton.tsx+++ b/packages/promo-pages/src/components/homepage/NewsletterButton.tsx@@ -1,4 +1,4 @@-import {Button} from '@remotion/design';+import {Button, CheckIcon, PlanePaperIcon} from '@remotion/design';import React, {useCallback, useState} from 'react';import {SectionTitle} from './VideoAppsTitle';@@ -58,7 +58,7 @@ export const NewsletterButton: React.FC<{}> = () => {</div><div className="flex flex-col md:flex-row gap-2 justify-center"><input- className="w-full dark:bg-[#121212] md:max-w-[400px] rounded-md border-effect border-black outline-none h-14 px-3 fontbrand text-lg box-border"+ className="w-full dark:bg-[#121212] md:max-w-[400px] rounded-lg border-effect border-black outline-none h-14 px-3 fontbrand text-lg box-border"disabled={submitting}value={email}onChange={(e) => setEmail(e.target.value)}@@ -69,10 +69,14 @@ export const NewsletterButton: React.FC<{}> = () => {<div><Buttontype="submit"- className="w-full h-14 px-6 bg-brand text-white font-bold disabled:text-white/50 disabled:border-black"+ className="w-14 rounded-full h-14 bg-brand text-white font-bold disabled:text-white/50 disabled:border-black px-0 py-0"disabled={submitting || subscribed}>- {subscribed ? 'Subscribed!' : 'Subscribe'}+ {subscribed ? (+ <CheckIcon className=" size-5 mt-[1px]" />+ ) : (+ <PlanePaperIcon className=" size-6 ml-[2px]" />+ )}</Button></div></div>