UNPKG

@lanaco/lnc-react-ui

Version:

React component library

57 lines (49 loc) 1.99 kB
"use strict";const t=require("react/jsx-runtime"),f=require("react"),r=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),i=require("./consts-CtNoHdBj.cjs"),x=require("./Button.cjs"),b=r.newStyled.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 (max-width: ${i.MOBILE_SIZE_PX+"px"}) { gap: 1.5rem; flex-direction: column; min-height: unset; max-height: unset; & button { width: fit-content; } } `,p=r.newStyled.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 (max-width: ${i.MOBILE_SIZE_PX+"px"}) { padding: 0; flex-direction: column; } `,w=r.newStyled.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; } `,y=f.forwardRef((e,v)=>{const{title:n,subtitle:o,buttonText:a,onClick:l,height:s,imageWidth:d,imageHeightMob:c,smallPadding:m=!1,isHorizontalContent:h=!1,backgroundColor:u,hasBorder:g=!1}=e;return t.jsx(b,{bgcolor:u,height:s,imgW:d,imgHMob:c,hasBorder:g,children:t.jsxs(p,{isHorizontalContent:h,smallPadding:m,children:[t.jsxs(w,{children:[t.jsx("div",{className:"header-title",children:n}),t.jsx("div",{className:"header-subitle",children:o})]}),t.jsx(x,{size:"medium",color:"neutral",type:"button",borderRadius:"curved",onClick:l,children:a})]})})});module.exports=y;