1.0.0 • Published 6 years ago
b-urumqi-button v1.0.0
b-urumqi-button
Button UI component for React
Features
- Supports IE9, IE9+, Chrome, Firefox & Safari
Install
npm install --save b-urumqi-button
yarn add --save b-urumqi-buttonUsage
import 'b-urumqi-button/assets/index.less';
import React from 'react';
import ReactDOM from 'react-dom';
import Button from 'b-urumqi-button';
ReactDOM.render(
<div>
<p>button</p>
<Button
name={"默认按钮"}
className={"initBtn"}
style={{ background: "red" }}
handleClick={() =>
console.log("welcome")
}
/>
</div>,
document.getElementById('__react-content')
);API
Button
| Name | Type | Default | Description |
|---|---|---|---|
| name | string | | Set button label. | |
| className | string | Additional CSS class for the root DOM node. | |
| style | Object | {} | Set style. |
| handleClick | Function | NOOP | click the button event. |
Development
npm install
npm startExample
npm start and then go to http://localhost:8004/examples/
License
b-urumqi-button is released under the MIT license.
1.0.0
6 years ago