babel-plugin-react-docgen
Version:
Babel plugin to add react-docgen info into your code
18 lines (16 loc) • 338 B
JavaScript
import React from 'react';
export const Button = ({ children, onClick, style = {} }) => {
return (
<button
style={{ }}
onClick={onClick}
>
{children}
</button>
);
};
Button.propTypes = {
children: React.PropTypes.string.isRequired,
onClick: React.PropTypes.func,
style: React.PropTypes.object,
};