feat(docs): update quick start page and add reference section

This commit is contained in:
rzmk 2025-10-03 20:38:24 -04:00
parent cbd0a6dfd9
commit b984c3b5e0
12 changed files with 435 additions and 4 deletions

15
docs/lib/merge-refs.ts Normal file
View file

@ -0,0 +1,15 @@
import type * as React from 'react';
export function mergeRefs<T>(
...refs: (React.Ref<T> | undefined)[]
): React.RefCallback<T> {
return (value) => {
refs.forEach((ref) => {
if (typeof ref === 'function') {
ref(value);
} else if (ref) {
ref.current = value;
}
});
};
}