mirror of
https://github.com/yldio/copilot.git
synced 2024-11-14 23:30:05 +02:00
30 lines
465 B
Markdown
30 lines
465 B
Markdown
|
# `<Button>`
|
||
|
|
||
|
## demo
|
||
|
|
||
|
```embed
|
||
|
const React = require('react');
|
||
|
const ReactDOM = require('react-dom/server');
|
||
|
const Button = require('./index.js');
|
||
|
const styles = require('./style.css');
|
||
|
|
||
|
nmodule.exports = ReactDOM.renderToString(
|
||
|
<Button>Hello World</Button>
|
||
|
);
|
||
|
```
|
||
|
|
||
|
## usage
|
||
|
|
||
|
```js
|
||
|
const React = require('react');
|
||
|
const Button = require('ui/button');
|
||
|
|
||
|
module.exports = () => {
|
||
|
return (
|
||
|
<Button disabled={false}>
|
||
|
Hello World
|
||
|
</Button>
|
||
|
);
|
||
|
}
|
||
|
```
|