* [app-js] fixed copyright * [app-js] css fixes * [app-js] Add api to window object * Make CSS columns resizable (FF & Chrome) * Window Interface export * formatting * Make columns responsive, added Dropdown * Added code snippets * Strip down output to functional component * removed component state, removed onEdit, update on select * Editor styling * Added snippets and local storage * output formatting * Example dummies * Cleanup & examples * Added util & keyring @polkadot modules to window object * Moved intro to component to make it translatable * Added more RPC examples * small fix * WIP exaples * Styles for resizer, fixed flex overflow misbehaviour * remove code from snippets for options, * Added labels to dropdown * Examples * More examples and removed deprecated examples * Added labels to dropdown -> missing type decl. * correst link to ui-keyring package * Make tslint happy * Pull api clone/disconnect into sd-668 (#686) * JS playground & console (start something...) * It runs... * WIP * Use codeflask * Highlights * Small updates, console v0.1 is ok to play with * Bump * Only shadow, no border (article) * Allow API to be disposed of between runs * Clone and disconnect API * Move id generation (no need for constructor) * Small updates * Small type adjustments * smaller fixes after code review * updated yarn.lock * move options calculation out of return * Remove exposure of api to window object * Expand JS console logging (#691) * Expand JS console logging * Log extrinsics directly * switch to getDerivedStateFromProps() * roll back ts versions * react-i18next rollback to 9.0.2 * Lock react-i18next to 9.0.2 |
||
|---|---|---|
| .. | ||
| src | ||
| test | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
| webpack.config.js | ||
@polkadot/ui-reactive
A collection of RxJS enabled React components that operate with the @polkadot/api-rx library. It automatically manages subscriptions on behalf of the developer, providing a number of unstyled components that can be used to construct UIs.
usage
Basic usage entails creating a ContextProvider and just using the components. For instance, to display the current node time,
import React from 'react';
import ReactDOM from 'react-dom';
import { Api, NodeTime } from '@polkadot/ui-reactive';
...
ReactDOM.render(
<Api>
<NodeTime />
</Api>,
document.querySelector('#container')
);
...
All components are provided unstyled making no assumptions on the actual use, however they all support (optionally) the label, className and style attributes, that can be used to style to component.
...
ReactDOM.render(
<Api>
<NodeTime className='rx-time' label='current node time:' />
</Api>,
document.querySelector('#container')
);
...