UNPKG

@frontify/fondue

Version:
63 lines (62 loc) 1.81 kB
import { jsxs as l, Fragment as i, jsx as e } from "react/jsx-runtime"; var w = /* @__PURE__ */ ((t) => (t.NoLine = "noline", t.Dashed = "dashed", t.Solid = "solid", t.Dotted = "dotted", t))(w || {}), m = /* @__PURE__ */ ((t) => (t.Small = "36px", t.Medium = "60px", t.Large = "96px", t))(m || {}); const o = { noline: "tw-border-none", dashed: "tw-border-dashed", solid: "tw-border-solid", dotted: "tw-border-dotted" }, c = "fondue-divider", u = ({ vertical: t = !1, style: r = "solid", height: d = "36px", "data-test-id": s = c, color: a = "#CCC" }) => { const n = `tw-w-px tw-h-full tw-border-r tw-m-0 ${o[r]}`; return /* @__PURE__ */ l(i, { children: [ t && /* @__PURE__ */ e( "div", { "aria-hidden": "true", className: "tw-flex tw-self-stretch tw-mt-0 tw-mb-0 tw-items-center tw-justify-center", "data-test-id": s, style: { marginLeft: parseInt(d) / 2, marginRight: parseInt(d) / 2 }, children: /* @__PURE__ */ e( "div", { className: n, style: { borderRightColor: a }, "data-test-id": "fondue-divider-line" } ) } ), !t && /* @__PURE__ */ e( "div", { "aria-hidden": "true", className: "tw-flex tw-items-center tw-w-full", style: { height: d }, "data-test-id": s, children: /* @__PURE__ */ e( "hr", { className: `tw-border-t tw-m-0 tw-w-full ${o[r]}`, style: { borderTopColor: a }, "data-test-id": "fondue-divider-line" } ) } ) ] }); }; u.displayName = "FondueDivider"; export { u as Divider, m as DividerHeight, w as DividerStyle }; //# sourceMappingURL=Divider.es.js.map