2016-10-23 07:27:18 +03:00
|
|
|
# `<Button>`
|
|
|
|
|
|
|
|
## demo
|
|
|
|
|
|
|
|
```embed
|
|
|
|
const React = require('react');
|
|
|
|
const ReactDOM = require('react-dom/server');
|
2016-10-26 13:55:08 +03:00
|
|
|
const Base = require('../base');
|
|
|
|
const Container = require('../container');
|
|
|
|
const Row = require('../row');
|
|
|
|
const Column = require('../column');
|
2016-10-23 07:27:18 +03:00
|
|
|
const Button = require('./index.js');
|
|
|
|
const styles = require('./style.css');
|
|
|
|
|
|
|
|
nmodule.exports = ReactDOM.renderToString(
|
2016-10-26 13:55:08 +03:00
|
|
|
<Base>
|
2016-10-26 19:32:38 +03:00
|
|
|
<Row>
|
|
|
|
<Column>
|
|
|
|
<Button>
|
|
|
|
Create an Instance
|
|
|
|
</Button>
|
|
|
|
</Column>
|
|
|
|
<Column>
|
|
|
|
<Button secondary>
|
|
|
|
Cancel
|
|
|
|
</Button>
|
|
|
|
</Column>
|
|
|
|
<Column>
|
|
|
|
<Button disabled>
|
|
|
|
Inactive Button
|
|
|
|
</Button>
|
|
|
|
</Column>
|
|
|
|
</Row>
|
2016-10-26 13:55:08 +03:00
|
|
|
</Base>
|
2016-10-23 07:27:18 +03:00
|
|
|
);
|
|
|
|
```
|
|
|
|
|
|
|
|
## usage
|
|
|
|
|
|
|
|
```js
|
|
|
|
const React = require('react');
|
|
|
|
const Button = require('ui/button');
|
|
|
|
|
|
|
|
module.exports = () => {
|
|
|
|
return (
|
2016-10-26 13:55:08 +03:00
|
|
|
<Button>
|
2016-10-23 07:27:18 +03:00
|
|
|
Hello World
|
|
|
|
</Button>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
```
|