initial commit
This commit is contained in:
commit
3b3c9a9417
258 changed files with 20086 additions and 0 deletions
10
services/myblog/frontend/layout_auth/Layout.module.css
Normal file
10
services/myblog/frontend/layout_auth/Layout.module.css
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
.container {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto 1fr;
|
||||
grid-template-rows: 100px 1fr 100px;
|
||||
|
||||
min-height: 100vh;
|
||||
grid-template-areas:
|
||||
". . ."
|
||||
". form .";
|
||||
}
|
||||
5
services/myblog/frontend/layout_auth/Layout.props.ts
Normal file
5
services/myblog/frontend/layout_auth/Layout.props.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import {DataHTMLAttributes, DetailedHTMLProps, HTMLAttributes, ReactNode} from "react";
|
||||
|
||||
export interface LayoutProps {
|
||||
children: ReactNode;
|
||||
}
|
||||
21
services/myblog/frontend/layout_auth/Layout.tsx
Normal file
21
services/myblog/frontend/layout_auth/Layout.tsx
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
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>
|
||||
);
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue