UNPKG

@lanaco/lnc-react-ui

Version:

React component library

115 lines (107 loc) 2.69 kB
import { jsx as t, jsxs as i } from "react/jsx-runtime"; import { forwardRef as p } from "react"; import { s as r } from "./emotion-styled.browser.esm-DfbrHHed.js"; import { d as o } from "./breakpoints-BubDitvo.js"; import x from "./Button.js"; const v = 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 ${o("S")} { gap: 1.5rem; flex-direction: column; min-height: unset; max-height: unset; & button { width: fit-content; } } `, y = 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 ${o("S")} { 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; } `, B = p((e, n) => { const { title: a, subtitle: l, buttonText: d, onClick: s, height: c, imageWidth: m, imageHeightMob: g, smallPadding: h = !1, isHorizontalContent: f = !1, backgroundColor: u, hasBorder: b = !1 } = e; return /* @__PURE__ */ t( v, { ref: n, bgcolor: u, height: c, imgW: m, imgHMob: g, hasBorder: b, className: "lp-section lp-bnr-section lp-banner-section-basic banner-section-basic-lnc", children: /* @__PURE__ */ i( y, { isHorizontalContent: f, smallPadding: h, children: [ /* @__PURE__ */ i(w, { children: [ /* @__PURE__ */ t("div", { className: "header-title", children: a }), /* @__PURE__ */ t("div", { className: "header-subitle", children: l }) ] }), /* @__PURE__ */ t( x, { size: "medium", color: "neutral", type: "button", borderRadius: "curved", onClick: s, children: d } ) ] } ) } ); }); export { B as default };