Skip to content

Commit

Permalink
k
Browse files Browse the repository at this point in the history
  • Loading branch information
holtzy committed Nov 8, 2024
1 parent d622ca1 commit 984b4a9
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pages/course/animation/react-spring-for-dataviz.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,9 @@ const exercises: Exercise[] = [
</ul>
</>
),
practiceSandbox: 'exercise/CanvasBasicCirclePractice',
solutionSandbox: 'exercise/CanvasBasicCircleSolution',
practiceSandbox: 'exercise/AnimationDefaultPractice',
solutionSandbox: 'exercise/AnimationSimpleCircleSolution',
fileToOpen: 'Graph.tsx',
},
{
whyItMatters: (
Expand Down
6 changes: 6 additions & 0 deletions viz/exercise/AnimationDefaultPractice/Graph.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const width = 500;
const height = 300;

export const Graph = () => {
return <svg width={width} height={height}></svg>;
};
6 changes: 6 additions & 0 deletions viz/exercise/AnimationDefaultPractice/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// File used to render something in codesandbox only
import ReactDOM from 'react-dom';
import { Graph } from './Graph';

const rootElement = document.getElementById('root');
ReactDOM.render(<Graph />, rootElement);
31 changes: 31 additions & 0 deletions viz/exercise/AnimationDefaultPractice/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "pie-chart-basic",
"version": "1.0.0",
"description": "",
"keywords": [],
"main": "index.js",
"dependencies": {
"react": "17.0.2",
"d3": "7.1.1",
"react-dom": "17.0.2",
"react-scripts": "4.0.0",
"@react-spring/web": "^9.3.1",
"react-spring": "9.3.2"
},
"devDependencies": {
"@babel/runtime": "7.13.8",
"typescript": "4.1.3"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}

0 comments on commit 984b4a9

Please sign in to comment.