Update examples to use latest rive-react

This commit is contained in:
Arthur Vivian
2021-09-10 14:14:34 +01:00
committed by Arthur Vivian
parent 1c3cc69f40
commit 5d0822836c
38 changed files with 353 additions and 120 deletions

View File

@@ -1,8 +1,8 @@
import { useRive, UseRiveParameters } from "rive-react";
import { useRive, UseRiveParameters } from 'rive-react';
function App() {
const params: UseRiveParameters = {
src: "poison-loader.riv",
src: 'poison-loader.riv',
autoplay: true,
};
@@ -10,7 +10,7 @@ function App() {
return (
// The animation will fit to the parent element.
<div style={{ height: "500px", width: "500px" }}>
<div style={{ height: '500px', width: '500px' }}>
<RiveComponent />
</div>
);

View File

@@ -1,10 +1,10 @@
import React from "react";
import ReactDOM from "react-dom";
import App from "./App";
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById("root")
document.getElementById('root')
);