Skip to content

Commit b7fcf1b

Browse files
committed
Update demo scripts
1 parent 111b467 commit b7fcf1b

File tree

6 files changed

+89
-9
lines changed

6 files changed

+89
-9
lines changed

demo.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import React from "react";
2-
import { render } from "react-dom";
2+
import { createRoot } from "react-dom/client";
33
import GithubContributions from "./src/GithubContributions";
44

5-
render(
5+
const container = document.getElementById("home");
6+
const root = createRoot(container!);
7+
8+
root.render(
69
<div>
710
<h1>React Github Graph Demo Page</h1>
811
<GithubContributions username="kylekarpack" />
9-
</div>,
10-
document.getElementById("home")
12+
</div>
1113
);

index.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

package-lock.json

Lines changed: 78 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
"@storybook/manager-webpack5": "^6.5.13",
3636
"@storybook/react": "^6.5.13",
3737
"@types/node": "^17.0.8",
38+
"@types/react": "^18.0.28",
39+
"@types/react-dom": "^18.0.11",
3840
"cross-env": "^7.0.2",
3941
"parcel": "^2.8.0",
4042
"react": "^18.2.0",

src/GithubContributions.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { FunctionComponent, useEffect, useState } from "react";
2-
import "./container.scss";
32
import { Loader } from "./Loader";
43

54
const GithubContributions: FunctionComponent<{ username: string }> = ({

src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import GithubContributions from "./GithubContributions";
22

3+
import cssText from "bundle-text:./container.scss";
4+
console.log(cssText);
5+
36
export { GithubContributions };
47
export default GithubContributions;

0 commit comments

Comments
 (0)