UNPKG

@glodon-aiot/react-components

Version:

aiot react components

49 lines (48 loc) 1.35 kB
var d = Object.defineProperty, k = Object.defineProperties; var f = Object.getOwnPropertyDescriptors; var n = Object.getOwnPropertySymbols; var u = Object.prototype.hasOwnProperty, m = Object.prototype.propertyIsEnumerable; var b = (o, t, r) => t in o ? d(o, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[t] = r, y = (o, t) => { for (var r in t || (t = {})) u.call(t, r) && b(o, r, t[r]); if (n) for (var r of n(t)) m.call(t, r) && b(o, r, t[r]); return o; }, a = (o, t) => k(o, f(t)); var i = (o, t) => { var r = {}; for (var s in o) u.call(o, s) && t.indexOf(s) < 0 && (r[s] = o[s]); if (o != null && n) for (var s of n(o)) t.indexOf(s) < 0 && m.call(o, s) && (r[s] = o[s]); return r; }; import { jsx as j } from "react/jsx-runtime"; import "./style.less.mjs"; const z = (o) => { const e = o, { primary: t = !1, size: r = "medium", backgroundColor: s, label: c } = e, l = i(e, [ "primary", "size", "backgroundColor", "label" ]), p = t ? "storybook-button--primary" : "storybook-button--secondary"; return /* @__PURE__ */ j("button", a(y({ type: "button", className: ["storybook-button", `storybook-button--${r}`, p].join(" "), style: { backgroundColor: s } }, l), { children: c })); }; export { z as Button };