UNPKG

stone-kit

Version:
65 lines (64 loc) 1.45 kB
import { jsxs as d, jsx as l } from "react/jsx-runtime"; import { c as u } from "../../../index-rKuIKazb.js"; const w = "_btnCommon_1act6_1", r = "_whiteFilled_1act6_34", t = { btnCommon: w, "auto-width": "_auto-width_1act6_18", "full-width": "_full-width_1act6_22", "small-size": "_small-size_1act6_26", whiteFilled: r }, _ = u.bind(t), F = ({ size: m = "small", pre: n = !1, children: o = "", post: i = !1, variant: s = "whiteFilled", width: c = "auto", additionalClass: a = "", ...e }) => { if (e.as === "link") { const { as: C, ...b } = e; return /* @__PURE__ */ d( "a", { className: _( t.btnCommon, t[`${m}-size`], t[`${s}`], { [t.btnCommonInline]: n || i }, t[`${c}-width`], a ), ...b, children: [ n && /* @__PURE__ */ l("div", { children: n }), o, i && /* @__PURE__ */ l("div", { children: i }) ] } ); } const { as: f, ...h } = e; return /* @__PURE__ */ d( "button", { className: _( t.btnCommon, t[`${m}-size`], t[`${s}`], { [t.btnCommonInline]: n || i }, t[`${c}-width`], a ), ...h, children: [ n && /* @__PURE__ */ l("div", { children: n }), o, i && /* @__PURE__ */ l("div", { children: i }) ] } ); }; export { F as MobileButton };