feat: make graph work in div

This commit is contained in:
2024-04-10 14:27:23 +02:00
parent 0ecf9798c4
commit 404fcbfe39
22 changed files with 331 additions and 1063 deletions

View File

@ -94,3 +94,14 @@ export const createLogger = (() => {
}
})();
export function withSubComponents<A, B extends Record<string, any>>(
component: A,
subcomponents: B
): A & B {
Object.keys(subcomponents).forEach((key) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(component as any)[key] = (subcomponents as any)[key];
});
return component as A & B;
}