From 7fe0cbeacb71af548f6db36033556a730e1179a6 Mon Sep 17 00:00:00 2001 From: Arthur Vivian Date: Mon, 7 Jun 2021 15:39:25 +0100 Subject: [PATCH] Autoplay by default on Rive component --- package.json | 2 +- src/components/Rive.tsx | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c5c3df3..51aa2af 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rive-react", - "version": "0.0.2", + "version": "0.0.3", "description": "React wrapper around the rive-js library", "main": "dist/index.js", "typings": "dist/types/index.d.ts", diff --git a/src/components/Rive.tsx b/src/components/Rive.tsx index cc5a6f5..d759ffe 100644 --- a/src/components/Rive.tsx +++ b/src/components/Rive.tsx @@ -5,9 +5,8 @@ import useRive from '../hooks/useRive'; export type RiveProps = { src: string; artboard?: string; - animations?: string; + animations?: string | string[]; layout?: Layout; - autoplay?: boolean; }; const Rive = ({ @@ -15,7 +14,6 @@ const Rive = ({ artboard, animations, layout, - autoplay, ...rest }: RiveProps & ComponentProps<'div'>) => { const params = { @@ -23,7 +21,7 @@ const Rive = ({ artboard, animations, layout, - autoplay, + autoplay: true, }; const { RiveComponent } = useRive(params);