Merge branch 'heads/main' into daniel/fips-initative

This commit is contained in:
Daniel Hougaard
2025-07-07 09:55:26 +04:00
720 changed files with 13000 additions and 13897 deletions
@@ -0,0 +1,20 @@
import { ComponentType, ReactNode } from "react";
type ShouldWrapProps<T extends Record<string, any>> = {
children: ReactNode;
wrapper: ComponentType<T & { children: ReactNode }>;
isWrapped?: boolean;
} & T;
export const ShouldWrap = <T extends Record<string, any>>({
children,
wrapper: Wrapper,
isWrapped = false,
...wrapperProps
}: ShouldWrapProps<T>) => {
if (isWrapped) {
return <Wrapper {...(wrapperProps as any)}>{children}</Wrapper>;
}
return children;
};