@lanaco/lnc-react-ui
Version:
React component library
83 lines (70 loc) • 2.66 kB
JavaScript
"use strict";const i=require("react/jsx-runtime"),o=require("react"),t=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),r=require("./consts-CtNoHdBj.cjs"),y=require("./Button.cjs"),j=t.newStyled.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: ${r.MOBILE_SIZE_PX+"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"};
}
}
`,v=t.newStyled.div`
padding: 2rem;
display: flex;
gap: 1.25rem;
justify-content: space-between;
flex: 1;
flex-direction: column;
@media (max-width: ${r.MOBILE_SIZE_PX+"px"}) {
padding: 1.25rem;
}
`,$=t.newStyled.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: ${r.MOBILE_SIZE_PX+"px"}) {
flex-direction: column;
}
`,S=t.newStyled.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: ${r.MOBILE_SIZE_PX+"px"}) {
}
`,_=o.forwardRef((e,a)=>{const{title:m,subtitle:s,buttonText:d,list:n,imageUrl:l,imageHeight:c,imageWidth:x,imageHeightMobile:g,hasBorder:h=!0,backgroundColor:p="transparent",onButtonAction:u=()=>{},buttonLink:f}=e;return i.jsxs(j,{ref:a,imgH:c,imgW:x,imgHMob:g,hasBorder:h,bgColor:p,children:[i.jsxs(v,{children:[i.jsxs($,{children:[i.jsx("div",{className:"header-title",children:m}),i.jsx("div",{className:"header-subitle",children:s})]}),i.jsx(S,{children:n==null?void 0:n.map((b,w)=>i.jsx(o.Fragment,{children:i.jsxs("div",{className:"list-item",children:[i.jsx("i",{className:"mng mng-lnc-checkmark--filled"}),i.jsx("span",{children:b})]})},w))}),i.jsx(y,{size:"medium",color:"gray",type:"button",btnType:"outline",onClick:()=>u(f),children:d})]}),i.jsx("img",{src:l})]})});module.exports=_;