react-focus-on
Version:
The final solution for WAI ARIA compatible modal dialogs or full-screen tasks.
11 lines (10 loc) • 771 B
JavaScript
import { __assign, __rest } from "tslib";
import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
import './button.css';
/** Primary UI component for user interaction */
export 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 = __rest(_a, ["primary", "size", "backgroundColor", "label"]);
var mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary';
return (_jsx("button", __assign({ type: "button", className: ['storybook-button', "storybook-button--".concat(size), mode].join(' '), style: { backgroundColor: backgroundColor } }, props, { children: label })));
};