@frontify/fondue
Version:
Design system of Frontify
34 lines (33 loc) • 827 B
JavaScript
import { useEffect as a } from "react";
import { merge as c } from "../../utilities/merge.es.js";
import { FilterableMultiSelectSize as o } from "./FilterableMultiSelect.es.js";
const n = (s) => {
const t = ["tw-pr-9"];
switch (s) {
case o.Small:
t.push("tw-pl-3 tw-py-1");
break;
case o.Medium:
t.push("tw-pl-[19px] tw-py-[11px]");
break;
default:
return;
}
return c(t);
}, w = (s, t, r) => {
a(() => {
function u(i) {
r != null && r.find(
(e) => e && (i.target === e || e.contains(i.target))
) || t();
}
return document.addEventListener("mousedown", u), () => {
document.removeEventListener("mousedown", u);
};
}, [t, s, r]);
};
export {
n as getPaddingClasses,
w as useClickOutside
};
//# sourceMappingURL=helpers.es.js.map