design-system-starter
Version:
Design system starter
33 lines (25 loc) • 792 B
JavaScript
/* design-system-starter v0.0.17 © 2019 Ryan Fitzer */
;
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var React = require('react');
var React__default = _interopDefault(React);
var propTypes = require('prop-types');
/**
* Just a plain `<button type="button" />`
*/
var Button = function Button(_ref) {
var text = _ref.text,
onClick = _ref.onClick;
return React__default.createElement("button", {
type: "button",
className: "button",
onClick: onClick
}, text);
};
Button.propTypes = {
/** The text to show in the button. */
text: propTypes.string.isRequired,
/** A handler function for when the button is clicked. */
onClick: propTypes.func
};
module.exports = Button;