@venuecms/sdk-next
Version:
This is a work in progress and is heavily in flux until we launch 1.0 in February.
2 lines • 816 B
JavaScript
import{a as c}from"./chunk-MI3IX7KY.mjs";import{a as s}from"./chunk-Z5LG7SRU.mjs";import{b as m}from"./chunk-ZGG4E7SE.mjs";import d from"next/image";import{jsx as e}from"react/jsx-runtime";var u={square:"aspect-square",video:"aspect-video"},N=({className:a,image:t,aspect:r,props:o})=>{if(t){let i=c(t);if(i){let{metadata:f,altText:n}=t,{width:p,height:g}=f??{};return r?e(l,{aspect:r,children:e(m,{src:i,image:t,className:a,...o})}):e(d,{src:i,alt:n??"image",width:p??2048,height:g??2048,className:a,...o})}}return r?e(l,{aspect:r,children:e(m,{src:"",className:a,...o})}):null},l=({children:a,aspect:t})=>e("div",{className:"flex h-full w-full flex-col gap-1",children:e("div",{className:s("relative h-full w-full bg-cover bg-center",u[t]),children:a})});export{N as a};
//# sourceMappingURL=chunk-AYVYS7LK.mjs.map