UNPKG

@unpic/solid

Version:

SolidJS component for responsive, high-performance images.

23 lines (20 loc) 616 B
import { spread, mergeProps, template } from 'solid-js/web'; import { transformProps, transformSourceProps } from '@unpic/core'; // src/image.tsx var _tmpl$ = /* @__PURE__ */ template(`<img>`); function Image(props) { return (() => { var _el$ = _tmpl$(); spread(_el$, mergeProps(() => transformProps(props)), false, false); return _el$; })(); } var _tmpl$2 = /* @__PURE__ */ template(`<source>`); function Source(props) { return (() => { var _el$ = _tmpl$2(); spread(_el$, mergeProps(() => transformSourceProps(props)), false, false); return _el$; })(); } export { Image, Source };