Skip to content

🎥 Make videos programmatically with React

skia: allow override of default props

Jonny Burgerf2e33bfbafb6
diff --git a/packages/skia/src/SkiaCanvas.tsx b/packages/skia/src/SkiaCanvas.tsx
index c11f3b9680..99ea1388f5 100644
--- a/packages/skia/src/SkiaCanvas.tsx
+++ b/packages/skia/src/SkiaCanvas.tsx
@@ -14,19 +14,27 @@ export const SkiaCanvas = ({
children,
height,
width,
+ style,
...otherProps
}: RemotionCanvasProps) => {
const contexts = Internals.useRemotionContexts();
- const style = useMemo(() => {
+ const props: CanvasProps = useMemo(() => {
return {
- width,
- height,
+ style: [
+ {
+ width,
+ height,
+ },
+ style,
+ ],
+ mode: 'continuous',
+ ...otherProps,
};
- }, [height, width]);
+ }, [height, otherProps, style, width]);
return (
- <Canvas {...otherProps} style={style} mode="continuous">
+ <Canvas {...props}>
<Internals.RemotionContextProvider contexts={contexts}>
{children}
</Internals.RemotionContextProvider>