UNPKG

fui-fancyui

Version:
27 lines (26 loc) 716 B
"use client"; import { jsx as n } from "react/jsx-runtime"; import f from "../../../utils/validations/isAspectRatioValid/isAspectRatioValid.js"; import { ImageWrapper as m } from "./FancyImageWrapper.style.js"; function R(r) { const { aspectRatio: e, borderRadius: t, externalStyle: i, sizeW: a, sizeH: o, children: s, filter: p, objectFit: l, ...c } = r; if (e && !f(e)) throw new Error('The aspect ratio is not valid. Please use the format "16/9"'); return /* @__PURE__ */ n( m, { $aspectRatio: e, $filter: p, $borderRadius: t, $externalStyle: i, $sizeH: o, $sizeW: a, $objectFit: l, ...c, children: s } ); } export { R as default };