UNPKG

@lanaco/lnc-react-ui

Version:

React component library

113 lines (105 loc) 2.61 kB
import { jsx as t, jsxs as i } from "react/jsx-runtime"; import { forwardRef as p } from "react"; import { n as r } from "./emotion-styled.browser.esm-CjCaF13H.js"; import { M as o } from "./consts-C1uHV4xc.js"; import x from "./Button.js"; const b = r.div` display: flex; border-radius: 0.75rem; background-color: ${(e) => e.bgcolor || "transparent"}; overflow: hidden; max-height: ${(e) => e.height || "22.5rem"}; min-height: ${(e) => e.height || "22.5rem"}; & button { width: fit-content; background-color: var(--gray-100, #f3f4f6); color: var(--gray-950, #14161a); } @media (max-width: ${o + "px"}) { gap: 1.5rem; flex-direction: column; min-height: unset; max-height: unset; & button { width: fit-content; } } `, v = r.div` padding: ${(e) => e.smallPadding === !0 ? "2rem" : "4rem 5rem"}; display: flex; gap: 2rem; flex-direction: ${(e) => e.isHorizontalContent === !0 ? "row" : "column"}; flex: 1; align-items: center; ${(e) => e.isHorizontalContent === !0 && "justify-content: space-between;"} @media (max-width: ${o + "px"}) { padding: 0; flex-direction: column; } `, w = r.div` display: flex; flex-direction: column; gap: 0.25rem; text-align: center; & .header-title { font-size: 1.75rem; font-weight: 600; color: var(--gray-950, #14161a); } & .header-subtitle { color: var(--gray-950, #14161a); font-size: 1rem; font-weight: 500; } `, k = p((e, y) => { const { title: n, subtitle: a, buttonText: l, onClick: d, height: m, imageWidth: c, imageHeightMob: s, smallPadding: h = !1, isHorizontalContent: g = !1, backgroundColor: f, hasBorder: u = !1 } = e; return /* @__PURE__ */ t( b, { bgcolor: f, height: m, imgW: c, imgHMob: s, hasBorder: u, children: /* @__PURE__ */ i( v, { isHorizontalContent: g, smallPadding: h, children: [ /* @__PURE__ */ i(w, { children: [ /* @__PURE__ */ t("div", { className: "header-title", children: n }), /* @__PURE__ */ t("div", { className: "header-subitle", children: a }) ] }), /* @__PURE__ */ t( x, { size: "medium", color: "neutral", type: "button", borderRadius: "curved", onClick: d, children: l } ) ] } ) } ); }); export { k as default };