tl-dashboards
v2.0.1-beta4
Published
Top ledger dashboards
Downloads
1,757
Readme
tl-dashboards
tl-dashboards is a library containing the dashboards used by TopLedger.
Installation
Required libraries:
- react (
>=16.8.0) - react-dom (
>=16.8.0)
Using npm:
npm install tl-dashboards@latestUsing yarn:
yarn add tl-dashboards@latestNote: @ant-design/icons is required dependency. Upon installing tl-dashboards, @ant-design/icons should automatically be installed since it's in peerDependencies list.
Copy required fonts to public/fonts directory
- fontawesome-webfont.woff2: https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.woff2
- Material-Design-Iconic-Font.woff2: https://cdnjs.cloudflare.com/ajax/libs/material-design-iconic-font/2.2.0/fonts/Material-Design-Iconic-Font.woff2
The public font directory should look like this:
public
└── fonts
├── fontawesome-webfont.woff2
└── Material-Design-Iconic-Font.woff2Usage
You can use render the dashboard component anywhere inside react dom.
You can follow the basic example given below:
import TLDashboards from "tl-dashboards";
function App() {
return (
<div className="App">
<TLDashboards
client="switchboard"
token="puWU5mljkjOTxHLoaaVM7rFpxhrm7lQw3SkphtLV"
/>
</div>
);
}
export default App;Dashboard output:
