fpdao-ui

2.2.2 • Public • Published

FPDAO UI

Shared FPDAO UI components

How to start using fpdao-ui

  1. Run npm install fpdao-ui

  2. Add "./node_modules/fpdao-ui/**/*" to content in tailwind.config.cjs

  3. Create AuthStore

import { AuthStore, createAuthStore } from 'fpdao-ui/auth-store';

let authStore = createAuthStore({
  whitelist: [], // canister ids...
  host: process.env.DFX_NETWORK !== "ic" ? "http://localhost:4943" : "https://icp0.io",
});
  1. In App.svelte check wallet connections
onMount(async () => {
  await authStore.checkConnections();
});

Include styles

import "fpdao-ui/styles/global.css";

Use svelte componentes

import Footer from "fpdao-ui/components/Footer.svelte";

<Footer {authState}></Footer>

Include favicon

<link rel="icon" type="image/svg+xml" href="/node_modules/fpdao-ui/images/fpd-logo.svg" />

Transfer ICP using a connected wallet

await authStore.transfer("<account-id>", <amount-e8s>);

Readme

Keywords

none

Package Sidebar

Install

npm i fpdao-ui

Weekly Downloads

1

Version

2.2.2

License

none

Unpacked Size

2.13 MB

Total Files

55

Last publish

Collaborators

  • zen.voich