Autoplay by default on Rive component

This commit is contained in:
Arthur Vivian
2021-06-07 15:39:25 +01:00
parent c0a6b835ea
commit 7fe0cbeacb
2 changed files with 3 additions and 5 deletions

View File

@@ -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",

View File

@@ -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);