🎥 Make videos programmatically with React
make "R" work again
Jonny Burger4056259bd36e
diff --git a/packages/cli/src/editor/components/RenderToolbarIcon.tsx b/packages/cli/src/editor/components/RenderToolbarIcon.tsxindex 8761ddc36c..fb68269e3f 100644--- a/packages/cli/src/editor/components/RenderToolbarIcon.tsx+++ b/packages/cli/src/editor/components/RenderToolbarIcon.tsx@@ -117,7 +117,12 @@ export const RenderButton: React.FC = () => {}return (- <Button title={tooltip} onClick={onClick} buttonContainerStyle={button}>+ <Button+ id="render-modal-button"+ title={tooltip}+ onClick={onClick}+ buttonContainerStyle={button}+ ><Row align="center"><RenderIcon svgProps={iconStyle} /><Spacing x={1} />diff --git a/packages/cli/src/preview-server/error-overlay/remotion-overlay/Button.tsx b/packages/cli/src/preview-server/error-overlay/remotion-overlay/Button.tsxindex fd52a09ecf..3c5ff50357 100644--- a/packages/cli/src/preview-server/error-overlay/remotion-overlay/Button.tsx+++ b/packages/cli/src/preview-server/error-overlay/remotion-overlay/Button.tsx@@ -1,4 +1,4 @@-import React, {useMemo} from 'react';+import React, {forwardRef, useMemo} from 'react';import {INPUT_BACKGROUND,INPUT_BORDER_COLOR_UNHOVERED,@@ -15,23 +15,31 @@ const button: React.CSSProperties = {flexDirection: 'row',};-export const Button: React.FC<{- onClick: () => void;- disabled?: boolean;- children: React.ReactNode;- style?: React.CSSProperties;- buttonContainerStyle?: React.CSSProperties;- autoFocus?: boolean;- title?: string;-}> = ({- children,- onClick,- title,- disabled,- style,- autoFocus,- buttonContainerStyle,-}) => {+const ButtonRefForwardFunction: React.ForwardRefRenderFunction<+ HTMLButtonElement,+ {+ onClick: () => void;+ disabled?: boolean;+ children: React.ReactNode;+ style?: React.CSSProperties;+ buttonContainerStyle?: React.CSSProperties;+ autoFocus?: boolean;+ title?: string;+ id?: string;+ }+> = (+ {+ children,+ onClick,+ title,+ disabled,+ style,+ id,+ autoFocus,+ buttonContainerStyle,+ },+ ref+) => {const combined = useMemo(() => {return {...button,@@ -51,6 +59,8 @@ export const Button: React.FC<{return (<button+ ref={ref}+ id={id}style={combined}type="button"disabled={disabled}@@ -64,3 +74,5 @@ export const Button: React.FC<{</button>);};++export const Button = forwardRef(ButtonRefForwardFunction);