amotify
Version:
UI Component for React,NextJS,esbuild
2 lines (1 loc) • 646 B
JavaScript
import{b as n,c as a,d as i}from"../chunk-C5N2D3ZX.js";import{jsx as h}from"react/jsx-runtime";import g from"./Box";import{Sheet as I}from"../fn";import{ImgClasses as m}from"../@styles/componentClasses";const p=l=>{let e=l,{src:s="",alt:c="",showExpand:t}=e,o=i(e,["src","alt","showExpand"]);return h(g,a(n({htmlTag:"img",src:s,alt:c},o),{className:[m("Img"),m("ShowExpand_"+!!t),o.className].join(" "),onPointerDown:r=>{o.onPointerDown&&o.onPointerDown(r),t&&r.stopPropagation()},onClick:r=>{o.onClick&&o.onClick(r),t&&(r.stopPropagation(),I.image({},t!=!0?t:s))},xcss:n({cursor:t?"zoom-in":"inherit"},o.xcss)}))};export{p as Img,p as default};