@lanaco/lnc-react-ui
Version:
React component library
105 lines (96 loc) • 2.4 kB
JavaScript
import { jsxs as o, jsx as e } from "react/jsx-runtime";
import { forwardRef as u, Fragment as x } from "react";
import { n as l } from "./emotion-styled.browser.esm-CjCaF13H.js";
import { M as a } from "./consts-C1uHV4xc.js";
import g from "./Button.js";
import { l as t } from "./utils-DtRLzzTZ.js";
const y = l.div`
padding-bottom: 1.38rem;
text-align: center;
display: flex;
justify-content: center;
flex-direction: column;
gap: 2rem;
align-items: center;
& button {
width: fit-content;
}
@media (max-width: ${a + "px"}) {
padding-bottom: 0;
}
`, b = l.div`
text-align: center;
display: flex;
justify-content: center;
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: ${a + "px"}) {
}
`, w = l.div`
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
gap: 0.75rem;
font-size: 0.875rem;
font-weight: 500;
align-items: center;
& .list-item {
display: flex;
align-items: center;
& .mng {
font-size: 1.25rem;
color: var(--success-600);
}
}
@media (max-width: ${a + "px"}) {
& .list-item {
flex-direction: column;
text-align: center;
justify-content: center;
gap: 0;
}
}
`, N = u((c, m) => {
const {
title: i,
subtitle: n,
buttonText: s,
list: r,
buttonLink: d,
onButtonAction: f = () => {
}
} = c;
return /* @__PURE__ */ o(y, { ref: m, children: [
(t(i) || t(n)) && /* @__PURE__ */ o(b, { children: [
t(i) && /* @__PURE__ */ e("div", { className: "header-title", children: i }),
t(n) && /* @__PURE__ */ e("div", { className: "header-subitle", children: n })
] }),
/* @__PURE__ */ e(w, { children: r == null ? void 0 : r.map((p, h) => /* @__PURE__ */ e(x, { children: /* @__PURE__ */ o("div", { className: "list-item", children: [
/* @__PURE__ */ e("i", { className: "mng mng-lnc-checkmark--filled" }),
/* @__PURE__ */ e("span", { children: p })
] }) }, h)) }),
/* @__PURE__ */ e(
g,
{
size: "medium",
color: "neutral",
type: "button",
onClick: () => f(d),
children: s
}
)
] });
});
export {
N as default
};