@weflex/weflex-ui
v2.8.4
Published
The UI Component that providing basic form controls which is compatible with React.js
Downloads
4
Readme
weflex-ui
The UI Library that used by WeFlex Products and Developers.
Get Started
import UIFramework from 'weflex-ui';
class ExampleForm extends React.Component {
constructor(props) {
super(props);
this.state = {
username: null,
password: null,
};
}
onLogin() {
// this.state.username
// this.state.password
}
render() {
return (
<UIFramework>
<UIFramework.Row name="username">
<UIFramework.TextInput bindStateCtx={this} bindStateName="username" />
</UIFramework.Row>
<UIFramework.Row name="username">
<UITextInput bindStateCtx={this} bindStateName="username" password={true} />
</UIFramework.Row>
<UIFramework.Row name="username">
<UIFramework.Button text="login" onClick={this.onLogin.bind(this)} />
</UIFramework.Row>
</UIFramework>
)
}
}
Components
See src/ for components.
Installation
$ npm install weflex-ui --save-dev
Tests
$ npm install
$ npm test
Example
$ cd examples
$ npm install && npm start
http://localhost:6798/
License
MIT @ WeFlex