Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 6b2ab778

Přidáno uživatelem Dominik Poch před asi 2 roky(ů)

Created more generic layout props

Props will be used in multiple layouts and all will have the same parameters. It does not have to be assigned specifically for the login.

Zobrazit rozdíly:

webapp/layouts/loginLayout.tsx
2 2
import Image from 'next/image';
3 3
import styles from '/styles/login.module.scss';
4 4
import { Col, Container, Row, Stack } from 'react-bootstrap';
5
import { LayoutProps } from 'antd';
5 6

  
6 7
/**
7 8
 * Creates layout of a login screen.
8 9
 * @param props Html structure of a login form.
9 10
 * @returns The login screen.
10 11
 */
11
export function LoginLayout(props: LoginProps) {
12
export function LoginLayout(props: LayoutProps) {
12 13
    return (
13 14
        <Container>
14 15
            <Row className="min-vh-100 align-items-center">
......
34 35
        </Container>
35 36
    );
36 37
}
37

  
38
/**
39
 * Props prepared for the login form that is passed to the login layout.
40
 */
41
export type LoginProps = {
42
    children: React.ReactNode;
43
};

Také k dispozici: Unified diff