@trellixio/roaster-coffee
Version:
Beans' product component library
39 lines (33 loc) • 940 B
JavaScript
;
var React = require('react');
var index = require('../../utils/classNames/index.js');
require('@floating-ui/react');
function _interopNamespaceDefault(e) {
var n = Object.create(null);
if (e) {
for (var k in e) {
n[k] = e[k];
}
}
n.default = e;
return Object.freeze(n);
}
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
const ButtonIcon = React__namespace.forwardRef((props, ref) => {
const { children, submit, variant = "close", disabled, className, style, onClick } = props;
return /* @__PURE__ */ React__namespace.createElement(
"button",
{
ref,
style,
onClick,
disabled,
type: submit ? "submit" : "button",
className: index.classNames("button-icon", variant, { disabled }, className)
},
children
);
});
ButtonIcon.displayName = "ButtonIcon";
exports.ButtonIcon = ButtonIcon;
//# sourceMappingURL=ButtonIcon.js.map