design-system-starter
Version:
Design system starter
28 lines (22 loc) • 586 B
JavaScript
/* design-system-starter v0.0.17 © 2019 Ryan Fitzer */
import React from 'react';
import { string, func } from 'prop-types';
/**
* Just a plain `<button type="button" />`
*/
var Button = function Button(_ref) {
var text = _ref.text,
onClick = _ref.onClick;
return React.createElement("button", {
type: "button",
className: "button",
onClick: onClick
}, text);
};
Button.propTypes = {
/** The text to show in the button. */
text: string.isRequired,
/** A handler function for when the button is clicked. */
onClick: func
};
export default Button;