You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
617 B
TypeScript

import {LayoutProps} from "./Layout.props";
import styles from "./Layout.module.css"
import cn from "classnames";
import {Component, FunctionComponent} from "react";
const Layout = ({ children }: LayoutProps): JSX.Element => {
return(
<div className={styles.container} >
{children}
</div>
);
};
export const withLayout = <T extends Record<string, unknown>>(Component: FunctionComponent<T>) => {
return function withLayoutComponent(props: T): JSX.Element {
return(
<Layout>
<Component {...props} />
</Layout>
);
};
};