UNPKG

@ark-ui/solid

Version:

A collection of unstyled, accessible UI components for Solid, utilizing state machines for seamless interaction.

19 lines (17 loc) 301 B
// src/utils/compose-refs.ts var isRefFn = (ref) => typeof ref === "function"; function setRef(ref, value) { if (isRefFn(ref)) { ref(value); } } function composeRefs(...refs) { return (node) => { for (const ref of refs) { setRef(ref, node); } }; } export { composeRefs };