Options
All
  • Public
  • Public/Protected
  • All
Menu

@dhealth/components

@dhealth/components

lerna License Discord In progress

Components library for dApps Development with dHealth Network.

NOTE: The author(s) and contributor(s) of this package cannot be held responsible for any loss of money or for any malintentioned usage forms of this package. Please use this package with caution.

Install notes

This library can be installed in your Javascript or Typescript project using npm install @dhealth/components.

Getting started with Vue

If you are developing a Vue software, note that you must register the components by installing the plugin on the Vue app instance.

// examples/GettingStartedWithVue.ts

// import
import { createApp } from 'vue'
import App from './App.vue'
import plugin from '@dhealth/components';

// install
createApp(App)
.use(plugin)
.mount("#app");

Use in Vue templates

// examples/UseInVueTemplates.ts

// use in templates
import { DappTokenAmount } from '@dhealth/components';
new Vue({
el: '#app',
components: { DappTokenAmount },
template: '<DappTokenAmount />'
});

Getting started with other software

If you are developing a PWA / Browser application or mobile software, you may use the UMD bundle to leverage the features of this library.

Note: the following example uses Vue in-browser, this can be replaced by any other framework and libraries including React, React Native, Angular, amongst many others.

// examples/GettingStartedWithBrowser.ts

// install
Vue.use(window.dHealthComponents.default);

// use in templates
new Vue({
el: '#app',
template: '<DappTokenAmount />',
});

// or use programmatically
console.log(window.dHealthComponents.DappTokenAmount);

Getting help

Use the following available resources to get help:

Contributing

Contributions are welcome and appreciated. Check CONTRIBUTING for information on how to contribute.

License

Copyright 2022-present dHealth Network, All rights reserved.

Licensed under the LGPL v3.0

Generated using TypeDoc