Design Auth index (#325)
This commit is contained in:
20
front/src/modules/auth/components/FooterNote.tsx
Normal file
20
front/src/modules/auth/components/FooterNote.tsx
Normal file
@ -0,0 +1,20 @@
|
||||
import React from 'react';
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
type OwnProps = {
|
||||
children: React.ReactNode;
|
||||
};
|
||||
|
||||
const StyledContainer = styled.div`
|
||||
align-items: center;
|
||||
color: ${({ theme }) => theme.text40};
|
||||
display: flex;
|
||||
font-size: ${({ theme }) => theme.fontSizeSmall}px;
|
||||
padding-left: ${({ theme }) => theme.spacing(14)};
|
||||
padding-right: ${({ theme }) => theme.spacing(14)};
|
||||
text-align: center;
|
||||
`;
|
||||
|
||||
export function FooterNote({ children }: OwnProps): JSX.Element {
|
||||
return <StyledContainer>{children}</StyledContainer>;
|
||||
}
|
||||
13
front/src/modules/auth/components/HorizontalSeparator.tsx
Normal file
13
front/src/modules/auth/components/HorizontalSeparator.tsx
Normal file
@ -0,0 +1,13 @@
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
const Separator = styled.div`
|
||||
background-color: ${(props) => props.theme.mediumBorder};
|
||||
height: 1px;
|
||||
margin-bottom: ${(props) => props.theme.spacing(3)};
|
||||
margin-top: ${(props) => props.theme.spacing(3)};
|
||||
width: 100%;
|
||||
`;
|
||||
|
||||
export function HorizontalSeparator(): JSX.Element {
|
||||
return <Separator />;
|
||||
}
|
||||
12
front/src/modules/auth/components/InputLabel.tsx
Normal file
12
front/src/modules/auth/components/InputLabel.tsx
Normal file
@ -0,0 +1,12 @@
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
type OwnProps = {
|
||||
label: string;
|
||||
subLabel?: string;
|
||||
};
|
||||
|
||||
const StyledContainer = styled.div``;
|
||||
|
||||
export function SubTitle({ label, subLabel }: OwnProps): JSX.Element {
|
||||
return <StyledContainer>{label}</StyledContainer>;
|
||||
}
|
||||
19
front/src/modules/auth/components/Logo.tsx
Normal file
19
front/src/modules/auth/components/Logo.tsx
Normal file
@ -0,0 +1,19 @@
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
const StyledLogo = styled.div`
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
|
||||
img {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
`;
|
||||
|
||||
export function Logo(): JSX.Element {
|
||||
return (
|
||||
<StyledLogo>
|
||||
<img src="icons/android/android-launchericon-192-192.png" alt="logo" />
|
||||
</StyledLogo>
|
||||
);
|
||||
}
|
||||
25
front/src/modules/auth/components/Modal.tsx
Normal file
25
front/src/modules/auth/components/Modal.tsx
Normal file
@ -0,0 +1,25 @@
|
||||
import React from 'react';
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
import { Modal as UIModal } from '@/ui/components/modal/Modal';
|
||||
|
||||
type OwnProps = {
|
||||
children: React.ReactNode;
|
||||
};
|
||||
|
||||
const StyledContainer = styled.div`
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-bottom: ${({ theme }) => theme.spacing(10)};
|
||||
padding-top: ${({ theme }) => theme.spacing(10)};
|
||||
width: 400px;
|
||||
`;
|
||||
|
||||
export function Modal({ children }: OwnProps): JSX.Element {
|
||||
return (
|
||||
<UIModal>
|
||||
<StyledContainer>{children}</StyledContainer>
|
||||
</UIModal>
|
||||
);
|
||||
}
|
||||
@ -36,7 +36,7 @@ export function RequireAuth({
|
||||
|
||||
useEffect(() => {
|
||||
if (!hasAccessToken()) {
|
||||
navigate('/auth/login');
|
||||
navigate('/auth');
|
||||
}
|
||||
}, [navigate]);
|
||||
|
||||
|
||||
11
front/src/modules/auth/components/SubTitle.tsx
Normal file
11
front/src/modules/auth/components/SubTitle.tsx
Normal file
@ -0,0 +1,11 @@
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
type OwnProps = {
|
||||
subTitle: string;
|
||||
};
|
||||
|
||||
const StyledSubTitle = styled.div``;
|
||||
|
||||
export function SubTitle({ subTitle }: OwnProps): JSX.Element {
|
||||
return <StyledSubTitle>{subTitle}</StyledSubTitle>;
|
||||
}
|
||||
15
front/src/modules/auth/components/Title.tsx
Normal file
15
front/src/modules/auth/components/Title.tsx
Normal file
@ -0,0 +1,15 @@
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
type OwnProps = {
|
||||
title: string;
|
||||
};
|
||||
|
||||
const StyledTitle = styled.div`
|
||||
font-size: ${({ theme }) => theme.fontSizeExtraLarge};
|
||||
font-weight: ${({ theme }) => theme.fontWeightSemibold};
|
||||
margin-top: ${({ theme }) => theme.spacing(10)};
|
||||
`;
|
||||
|
||||
export function Title({ title }: OwnProps): JSX.Element {
|
||||
return <StyledTitle>{title}</StyledTitle>;
|
||||
}
|
||||
Reference in New Issue
Block a user