@lanaco/lnc-react-ui
Version:
React component library
142 lines (129 loc) • 3.36 kB
JavaScript
import { jsxs as t, jsx as i } from "react/jsx-runtime";
import { forwardRef as v, Fragment as y } from "react";
import { n as r } from "./emotion-styled.browser.esm-CjCaF13H.js";
import { M as n } from "./consts-C1uHV4xc.js";
import $ from "./Button.js";
const H = r.div`
display: flex;
border-radius: 0.75rem;
background-color: ${(e) => e.bgcolor || "transparent"};
overflow: hidden;
& button {
width: fit-content;
}
& img {
object-fit: cover;
max-width: ${(e) => e.imgW || "33.39346rem"};
min-width: ${(e) => e.imgW || "33.39346rem"};
max-height: ${(e) => e.imgH || "22.5rem"};
min-height: ${(e) => e.imgH || "22.5rem"};
}
${(e) => e.hasBorder === !0 && `border: 1px solid var(--gray-95008, rgba(20, 22, 26, 0.08));
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.10), 0px 1px 2px 0px rgba(0, 0, 0, 0.06);
`}
@media (max-width: ${n + "px"}) {
flex-direction: column;
& img {
max-width: 100%;
min-width: 100%;
max-height: ${(e) => e.imgHMob || "12.1rem"};
min-height: ${(e) => e.imgHMob || "12.1rem"};
}
}
`, W = r.div`
padding: 2rem;
display: flex;
gap: 1.25rem;
justify-content: space-between;
flex: 1;
flex-direction: column;
@media (max-width: ${n + "px"}) {
padding: 1.25rem;
}
`, k = r.div`
display: flex;
flex-direction: column;
gap: 0.25rem;
& .header-title {
font-size: 1.5rem;
font-weight: 600;
}
& .header-subtitle {
color: var(--gray-600, #676e79);
font-size: 1rem;
font-weight: 500;
}
@media (max-width: ${n + "px"}) {
flex-direction: column;
}
`, B = r.div`
display: flex;
flex-direction: column;
gap: 0.75rem;
font-size: 0.875rem;
font-weight: 500;
& .list-item {
display: flex;
align-items: center;
& .mng {
font-size: 1.25rem;
color: var(--info-600);
}
}
@media (max-width: ${n + "px"}) {
}
`, N = v((e, m) => {
const {
title: a,
subtitle: d,
buttonText: l,
list: o,
imageUrl: c,
imageHeight: s,
imageWidth: g,
imageHeightMobile: h,
hasBorder: p = !0,
backgroundColor: x = "transparent",
onButtonAction: f = () => {
},
buttonLink: b
} = e;
return /* @__PURE__ */ t(
H,
{
ref: m,
imgH: s,
imgW: g,
imgHMob: h,
hasBorder: p,
bgColor: x,
children: [
/* @__PURE__ */ t(W, { children: [
/* @__PURE__ */ t(k, { children: [
/* @__PURE__ */ i("div", { className: "header-title", children: a }),
/* @__PURE__ */ i("div", { className: "header-subitle", children: d })
] }),
/* @__PURE__ */ i(B, { children: o == null ? void 0 : o.map((u, w) => /* @__PURE__ */ i(y, { children: /* @__PURE__ */ t("div", { className: "list-item", children: [
/* @__PURE__ */ i("i", { className: "mng mng-lnc-checkmark--filled" }),
/* @__PURE__ */ i("span", { children: u })
] }) }, w)) }),
/* @__PURE__ */ i(
$,
{
size: "medium",
color: "gray",
type: "button",
btnType: "outline",
onClick: () => f(b),
children: l
}
)
] }),
/* @__PURE__ */ i("img", { src: c })
]
}
);
});
export {
N as default
};