test-ui-component
v4.0.1
Published
Made with create-react-library
Downloads
15
Readme
@stackbyhq/stackby-apps-ui
Made with create-react-library
Features
- configurable via props
- Controllable state props and modular architecture
- Flexible approach to data, with customisable functions
- auto position
- small bundle size
Installation and usage
npm install --save @stackbyhq/stackby-apps-ui
Select Usage
import React from 'react';
import { Toggle } from '@stackbyhq/stackby-apps-ui';
class App extends React.Components {
state = {
toggle: false,
};
handleChange = val => {
this.setState({ toggle: val });
};
render() {
const { toggle } = this.state;
return (
<Toggle
isDisable={false}
onchange={handleChange}
value={toggle}
variant='Primary' //Danger, Success
size="L" // X, M
label="my react toggle"
isBackGround={true}
/>
);
}
}
Props
Common props you may want to specify include:
- onChange - subscribe to change events
- value - control the current value
- isDisable - set disable
- variant - set different variant EX: Primary, Danger and Success
- size - set different size EX: X, M and L
- label - set label
- isBackGround - set backGround
License
MIT © Stackbydev