mirror of
https://github.com/dathere/ckan-devstaller.git
synced 2025-11-09 13:39:49 +00:00
feat(docs): update quick start page and add reference section
This commit is contained in:
parent
cbd0a6dfd9
commit
b984c3b5e0
12 changed files with 435 additions and 4 deletions
15
docs/lib/merge-refs.ts
Normal file
15
docs/lib/merge-refs.ts
Normal 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;
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue