UNPKG

@anoki/fse-ui

Version:

FSE UI components library

3 lines (2 loc) 3.25 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/CardPaymentDocument/CardPaymentDocument.css');const n=require("./index.cjs237.js"),e=require("./index.cjs239.js");;/* empty css */const i=require("./index.cjs116.js"),p=require("./index.cjs61.js"),g=require("./index.cjs189.js"),w=require("./index.cjs106.js"),y=require("./index.cjs72.js"),E=require("./index.cjs32.js"),N=({headerText:j,beforeTitle:x,title:r,subtitle:c,footer:s,isLoading:a,asLink:h="a"})=>{var t,d,m,l,u;const R=h;return n.jsxRuntimeExports.jsxs("div",{className:e.clsx("ui-card-payment shadow br-x4 fw-semibold text-slate-28 fs-7"),children:[n.jsxRuntimeExports.jsx(i.Row,{"max-h":"x40","min-h":"x40",as:"header",justifyContent:"flex-end",alignItems:"center",px:"x24",className:"ui-card-payment-header",children:n.jsxRuntimeExports.jsx(i.Row,{className:"fw-semibold fs-7",children:j})}),n.jsxRuntimeExports.jsxs("div",{className:"ui-card-payment-main py-x16 px-x24",children:[n.jsxRuntimeExports.jsxs(p.Col,{pb:"x32",justifyContent:"space-between",gap:"x8",children:[n.jsxRuntimeExports.jsxs(i.Row,{justifyContent:x!=null&&x.rightBadgeText?"space-between":"flex-end",alignItems:"center",children:[x&&n.jsxRuntimeExports.jsx("div",{className:"fw-semibold",children:x==null?void 0:x.leftText}),(x==null?void 0:x.rightBadgeText)&&n.jsxRuntimeExports.jsx("div",{className:e.clsx("rounded py-x4 px-x16"),style:{backgroundColor:x.rightBadgeColor||"#000",color:"#fff",width:"max-content"},children:x.rightBadgeText})]}),n.jsxRuntimeExports.jsx("p",{className:"ui-card-payment-title fs-4 text-slate-20",children:r}),c&&n.jsxRuntimeExports.jsx("div",{style:{fontWeight:500},children:c})]}),s&&n.jsxRuntimeExports.jsxs(p.Col,{mt:"x16",className:"ui-card-payment-footer",children:[(s==null?void 0:s.descriptionText)&&n.jsxRuntimeExports.jsx("div",{children:(s==null?void 0:s.descriptionText)&&n.jsxRuntimeExports.jsx("p",{className:"fw-regular fs-7 text-slate-28 mb-x8",children:s.descriptionText})}),n.jsxRuntimeExports.jsxs(i.Row,{className:"ui-card-payment-footer-actions",justifyContent:s!=null&&s.downloadDoc?"space-between":"flex-end",alignItems:"center",children:[(s==null?void 0:s.downloadDoc)&&n.jsxRuntimeExports.jsxs(i.Row,{alignItems:"center",className:e.clsx(!a&&"cursor-pointer","text-decoration-none text-primary","ui-card-payment-download-row"),onClick:a||(t=s==null?void 0:s.downloadDoc)==null?void 0:t.clickCta,children:[n.jsxRuntimeExports.jsx(g.Download,{}),n.jsxRuntimeExports.jsx("p",{children:(d=s==null?void 0:s.downloadDoc)==null?void 0:d.label}),n.jsxRuntimeExports.jsx(w.Loader,{loading:a,className:"ml-x8"})]}),(s==null?void 0:s.ctaRight)&&((m=s==null?void 0:s.ctaRight)==null?void 0:m.href)&&n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(y.Divider,{bg:"border-divider",className:"ui-document-divider"}),n.jsxRuntimeExports.jsx(E.Button,{fwClassName:"fw-semibold",className:"ui-card-payment-cta px-x12",variant:"secondary",size:"5",asLink:R,href:((l=s==null?void 0:s.ctaRight)==null?void 0:l.href)??void 0,children:(u=s==null?void 0:s.ctaRight)==null?void 0:u.label})]})]})]})]})]})};exports.CardPaymentDocument=N; //# sourceMappingURL=index.cjs51.js.map