@crossed/demo
Version:
A universal & performant styling library for React Native, Next.js & React
62 lines (61 loc) • 3.16 kB
JavaScript
;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var Select_exports = {};
__export(Select_exports, {
SelectDemo: () => SelectDemo
});
module.exports = __toCommonJS(Select_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var import_ui = require("@crossed/ui");
const SelectDemo = ({ size, variant, color }) => {
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ui.Select, { size, variant, color, children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Select.Label, { children: "Size" }),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Select.Trigger, { "aria-label": "Size" }),
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ui.Select.Content, { children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Select.Item, { value: "xs", "aria-label": "xs", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Text, { children: "xs" }) }),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Select.Item, { value: "sm", "aria-label": "sm", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Text, { children: "sm" }) }),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Select.Item, { value: "md", "aria-label": "md", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Text, { children: "md" }) }),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Select.Item, { value: "lg", "aria-label": "lg", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Text, { children: "lg" }) }),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Select.Item, { value: "xl", "aria-label": "xl", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Text, { children: "xl" }) })
] })
] }),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
import_ui.SelectCompact,
{
size,
variant,
color,
label: "Size",
items: [
{ value: "xs", label: "xs" },
{ value: "sm", label: "sm" },
{ value: "md", label: "md" },
{ value: "lg", label: "lg" },
{ value: "xl", label: "xl" }
]
}
)
] });
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
SelectDemo
});
//# sourceMappingURL=Select.js.map