UNPKG

alinea

Version:
76 lines (72 loc) 2.3 kB
import { dist_default } from "../../chunks/chunk-A5O3N2GS.js"; import "../../chunks/chunk-NZLE2WMY.js"; // src/dashboard/view/Create.tsx import { HStack } from "alinea/ui"; import { IcRoundAddCircle } from "alinea/ui/icons/IcRoundAddCircle"; import { link } from "../util/HashRouter.js"; // src/dashboard/view/Create.module.scss var Create_module_default = { "root": "alinea-Create", "is-disabled": "alinea-Create-is-disabled", "isDisabled": "alinea-Create-is-disabled", "button": "alinea-Create-button", "button-add": "alinea-Create-button-add", "buttonAdd": "alinea-Create-button-add", "is-paste": "alinea-Create-is-paste", "isPaste": "alinea-Create-is-paste" }; // src/dashboard/view/Create.tsx import { jsx, jsxs } from "react/jsx-runtime"; var styles = dist_default(Create_module_default); var Create; ((Create2) => { function Root({ disabled, ...props }) { return /* @__PURE__ */ jsx("div", { ...props, className: styles.root.mergeProps(props)({ disabled }) }); } Create2.Root = Root; function Link({ children, icon: Icon, ...props }) { return /* @__PURE__ */ jsx( "a", { ...props, ...link(props.href), className: styles.button.mergeProps(props)(), children: /* @__PURE__ */ jsxs(HStack, { center: true, gap: 8, children: [ /* @__PURE__ */ jsx(IcRoundAddCircle, { style: { flexShrink: 0 } }), Icon && /* @__PURE__ */ jsx(Icon, {}), children && /* @__PURE__ */ jsx("span", { children }) ] }) } ); } Create2.Link = Link; function Button({ children, icon: Icon, mod, ...props }) { return /* @__PURE__ */ jsx( "button", { type: "button", ...props, className: styles.button.mergeProps(props)(mod), children: /* @__PURE__ */ jsxs(HStack, { center: true, gap: 8, children: [ Icon ? /* @__PURE__ */ jsx("div", { className: styles.button.add(), children: /* @__PURE__ */ jsx(Icon, {}) }) : /* @__PURE__ */ jsx("div", { className: styles.button.add(), children: /* @__PURE__ */ jsx(IcRoundAddCircle, {}) }), children && /* @__PURE__ */ jsx("span", { children }) ] }) } ); } Create2.Button = Button; })(Create || (Create = {})); export { Create };