rax-button
v0.6.5
Published
Button component for Rax.
Downloads
307
Readme
Button
Button is the basic button component. Internal implementation relies on <Touchable>
to support onPress defined click events.
Button with default styles, but also support the style of custom.
Install
$ npm install rax-button --save
Import
import Button from 'rax-button';
Props
| name | type | default | describe | | :------ | :------- | :--- | :--- | | onPress | Function | | click events |
At the same time to support any custom attributes through
Example
// demo
import {createElement, Component, render} from 'rax';
import View from 'rax-view';
import Button from 'rax-button';
class App extends Component {
render() {
return (
<View style={{ width: 750 }}>
<Button onPress={(evt) => { alert('你好'); }}>点我</Button>
</View>
);
}
}
render(<App />);