1.1.0 • Published 7 months ago

dspot-powerhouse-components v1.1.0

Weekly downloads
-
License
AGPL-3.0-only
Repository
-
Last release
7 months ago

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 />
1.1.0

7 months ago

1.0.0

8 months ago