react-focus-on
Version:
The final solution for WAI ARIA compatible modal dialogs or full-screen tasks.
14 lines (13 loc) • 891 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Button = void 0;
var tslib_1 = require("tslib");
var jsx_runtime_1 = require("react/jsx-runtime");
require("./button.css");
/** Primary UI component for user interaction */
var Button = function (_a) {
var _b = _a.primary, primary = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? 'medium' : _c, backgroundColor = _a.backgroundColor, label = _a.label, props = tslib_1.__rest(_a, ["primary", "size", "backgroundColor", "label"]);
var mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary';
return ((0, jsx_runtime_1.jsx)("button", tslib_1.__assign({ type: "button", className: ['storybook-button', "storybook-button--".concat(size), mode].join(' '), style: { backgroundColor: backgroundColor } }, props, { children: label })));
};
exports.Button = Button;