Design Auth index (#325)

This commit is contained in:
Charles Bochet
2023-06-18 23:51:59 +02:00
committed by GitHub
parent ffa8318e2e
commit 5904a39362
17 changed files with 325 additions and 7 deletions

View 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>;
}

View 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 />;
}

View 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>;
}

View 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>
);
}

View 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>
);
}

View File

@ -36,7 +36,7 @@ export function RequireAuth({
useEffect(() => {
if (!hasAccessToken()) {
navigate('/auth/login');
navigate('/auth');
}
}, [navigate]);

View 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>;
}

View 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>;
}