npm install --save @dlghq/dialog-components
importReactfrom'react';import{render}from'react-dom';import{Avatar}from'@dlghq/dialog-components';constcontainer=document.getElementById('container');render(<Avatartitle="Hipster Partycat"image="https://octodex.github.com/images/hipster-partycat.jpg"/>,container);For some complex components, like AuthForm you should wrap your components tree
by @dlghq/react-l10nProvider component.
Before publishing we generate messages.json bundle, which you should pass to Provider.
importReactfrom'react';import{render}from'react-dom';import{Provider}from'@dlghq/react-l10n';importdialogMessagesfrom'@dlghq/dialog-components/src/messages.json';importappMessagesfrom'./messages';constcontainer=document.getElementById('container');constmessages={ ...dialogMessages, ...appMessages};render(<Providermessages={messages}locale={navigator.language}><App/></Provider>,container);NPM scripts:
npm startstart dev servernpm run createcreate new componentnpm testrun testsnpm run lintrun lintersnpm run formatrun formattersnpm run buildbuild docs & librarynpm run releasebuild & publish to npm & publish to gh-pages