15 lines
221 B
JavaScript
15 lines
221 B
JavaScript
|
|
const r = require('r-dom');
|
|
|
|
const Button = props => r.button({
|
|
ref: input => {
|
|
if (input && props.autoFocus) {
|
|
input.focus();
|
|
}
|
|
},
|
|
className: 'button',
|
|
...props,
|
|
}, props.children);
|
|
|
|
module.exports = Button;
|