@lanaco/lnc-react-ui
Version:
React component library
69 lines (64 loc) • 1.54 kB
JavaScript
import { jsx as i } from "react/jsx-runtime";
import { forwardRef as h } from "react";
import { u as n } from "./useDetectMobile-B0Jog4jQ.js";
import { s as o } from "./emotion-styled.browser.esm-DfbrHHed.js";
import { d as p } from "./breakpoints-BubDitvo.js";
const d = o.div`
width: 100%;
height: 100%;
max-width: 60.625rem;
max-height: 5.625rem;
& .wrapper__image {
width: 100%;
height: 100%;
max-width: 60.625rem;
max-height: 5.625rem;
}
&:hover {
cursor: pointer;
}
@media ${p("S")} {
width: 100%;
height: 100%;
max-width: 100%;
max-height: 100%;
aspect-ratio: 1 / 1;
& .wrapper__image {
width: 100%;
height: 100%;
max-width: 100%;
max-height: 100%;
aspect-ratio: 1 / 1;
}
}
`, c = h(
({ image: t, imageForMobile: r, isMobile: a, onSelectCard: e }, m) => /* @__PURE__ */ i(d, { ref: m, children: /* @__PURE__ */ i(
"img",
{
src: a ? r : t,
className: "wrapper__image",
onClick: e
}
) })
), w = o.div`
display: flex;
justify-content: center;
width: 100%;
`, _ = h(
({ image: t, imageForMobile: r, link: a, onSelectCard: e = () => {
} }, m) => {
const s = n();
return /* @__PURE__ */ i(w, { ref: m, className: "lp-section lp-general-section lp-ad-banner-section", children: /* @__PURE__ */ i(
c,
{
image: t,
imageForMobile: r,
isMobile: s,
onSelectCard: () => e == null ? void 0 : e(a)
}
) });
}
);
export {
_ as default
};