@lanaco/lnc-react-ui
Version:
React component library
8 lines (7 loc) • 1.19 kB
JavaScript
;const n=require("react/jsx-runtime"),o=require("react"),u=require("./index-Fnc5qY9b.cjs"),l=require("./style-17Ie7d9D.cjs"),a=require("./emotion-styled.browser.esm-DwHBgTPn.cjs"),d=require("./breakpoints-CcVm-gVm.cjs"),x=a.styled(l.SkeletonAnimationColumnContainer)`
@media ${d.down("S")} {
& > div {
height: 13.25rem;
}
}
`,S=({keyPrefix:t})=>n.jsx(x,{children:n.jsx(l.SkeletonRect,{width:"100%",height:"11.25rem"},`${t}-0`)}),h=({keyPrefix:t,isLoading:r=!1,fallbackComponent:s=n.jsx(n.Fragment,{}),children:e})=>n.jsx(o.Suspense,{fallbackComponent:s,children:r===!0?n.jsx(S,{keyPrefix:t}):e}),j=o.forwardRef((t,r)=>{const{isLoading:s,item:e,onSelectCard:i=()=>{},getImage:c=()=>{},LinkComponent:g}=t;return n.jsx("div",{className:"lp-section lp-blog-single-section",children:n.jsx(h,{isLoading:s,keyPrefix:"blogs-single-skeleton",children:n.jsx(u.BlogCardLarge,{ref:r,title:e==null?void 0:e.title,imageUrl:c(e==null?void 0:e.imageUrl,e==null?void 0:e.uuid)||null,text:e==null?void 0:e.description,titleSlug:e==null?void 0:e.titleSlug,buttonText:e==null?void 0:e.buttonText,onCardClick:()=>i(e==null?void 0:e.titleSlug),LinkComponent:g})})})});module.exports=j;