UNPKG

@clubmed/trident-ui

Version:

Shared ClubMed React UI components

24 lines (23 loc) 491 B
import { Children as i, isValidElement as p } from "react"; function f(e, o = []) { const t = { children: [] }; return i.map(e, (s) => { if (p(s)) { const r = s.props; if (r["data-slot"]) { const n = r["data-slot"]; if (!o.length || o.length && o.includes(n)) { t[n] || (t[n] = []), t[n].push(s); return; } } } t.children.push(s); }), t; } export { f as useSlots }; //# sourceMappingURL=useSlots.js.map