@transkripid/flowbite-react
Version:
Official React components built for Flowbite and Tailwind CSS - Transkrip.id fork
28 lines (27 loc) • 626 B
JavaScript
import { offset as n, autoPlacement as u, flip as i, shift as r, arrow as s } from "@floating-ui/react";
const l = ({
arrowRef: t,
placement: o
}) => {
const e = [];
return e.push(n(8)), e.push(o === "auto" ? u() : i()), e.push(r({
padding: 8
})), t != null && t.current && e.push(s({
element: t.current
})), e;
}, c = ({
placement: t
}) => t === "auto" ? void 0 : t, m = ({
placement: t
}) => ({
top: "bottom",
right: "left",
bottom: "top",
left: "right"
})[t.split("-")[0]];
export {
m as getArrowPlacement,
l as getMiddleware,
c as getPlacement
};
//# sourceMappingURL=helpers.mjs.map