-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
embed network fee stats using Canvas (#555)
* embed network fee stats using Canvas. * wrap the canvas component in BrowserOnly * create a custom component for the embedded fee charts * use the custom component on the resource limits page * add the canvas fees embed into the "learn" page about fees * Update section title --------- Co-authored-by: Jane Wang <[email protected]>
- Loading branch information
1 parent
ea42753
commit 752e24d
Showing
6 changed files
with
741 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react'; | ||
import BrowserOnly from '@docusaurus/BrowserOnly'; | ||
|
||
import styles from './styles.module.css' | ||
|
||
export default function CanvasEmbed() { | ||
return ( | ||
<div className={styles.CanvasFeeWrapper}> | ||
<BrowserOnly fallback={<div>Loading...</div>}> | ||
{() => { | ||
const Canvas = require("canvas-embed").Canvas; | ||
return <Canvas canvasId="k3X9xS" />; | ||
}} | ||
</BrowserOnly> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.CanvasFeeWrapper { | ||
margin-bottom: var(--ifm-paragraph-margin-bottom); | ||
} |
Oops, something went wrong.