dspot-powerhouse-components
v1.1.0
Published
Component libraries reused across multiple Powerhouse projects.
Downloads
942
Readme
DSpot Components for Powerhouse
Component libraries reused across multiple Powerhouse projects.
Install
yarn add dspot-powerhouse-components @emotion/react @emotion/styled @mui/material
Important: @emotion/react @emotion/styled @mui/material
are required as peer dependencies as well as react
and react-dom
ThemeProvider
In order to show the components styles correctly, them should be wrapped in a ThemeProvider
import { ThemeProvider } from 'dspot-powerhouse-components';
<ThemeProvider isLight={/* theme mode: true: light, false: dark */}>
{* ... *}
</ThemeProvider>
AccountsSnapshot
Component
This example shows how the Account Snapshots component can be used.
import { AccountsSnapshot } from 'dspot-powerhouse-components';
<AccountsSnapshot
snapshot={/* data from API */}
snapshotOwner={/* owner string */}
sinceDate={/* date where the snapshot data started */}
resourceType={/* CoreUnit, EcosystemActor, Delegates, ... */}
/>
AccountsSnapshotSkeleton
Component
No props required
import { AccountsSnapshotSkeleton } from 'dspot-powerhouse-components';
<AccountsSnapshotSkeleton />