Skip to content
Snippets Groups Projects
Verified Commit 92ab282c authored by Andreas Ellewsen's avatar Andreas Ellewsen
Browse files

Match loginbox closer to sketches

Boxes are now spaced automatically on the login page, and the box on the
invite page fills the horizontal space.
parent 5d6df899
No related branches found
No related tags found
1 merge request!207Make invite page match sketches
Pipeline #104477 passed
...@@ -16,21 +16,22 @@ const StyledBox = styled(Box)({ ...@@ -16,21 +16,22 @@ const StyledBox = styled(Box)({
borderColor: 'black', borderColor: 'black',
borderWidth: '2px', borderWidth: '2px',
borderRadius: '11px', borderRadius: '11px',
width: '24rem',
height: '18rem',
}) })
interface LoginBoxProps { interface LoginBoxProps {
header: string header: string
info: string info: string
manual?: boolean manual?: boolean
large?: boolean
} }
const LoginBox = ({ header, info, manual }: LoginBoxProps) => { const LoginBox = ({ header, info, manual, large }: LoginBoxProps) => {
const { t } = useTranslation('login') const { t } = useTranslation('login')
return ( return (
<StyledBox <StyledBox
sx={{ sx={{
width: large ? '48rem' : '24rem',
height: '18rem',
marginBottom: { xs: '2rem', md: '0rem' }, marginBottom: { xs: '2rem', md: '0rem' },
}} }}
> >
...@@ -80,5 +81,5 @@ const LoginBox = ({ header, info, manual }: LoginBoxProps) => { ...@@ -80,5 +81,5 @@ const LoginBox = ({ header, info, manual }: LoginBoxProps) => {
</StyledBox> </StyledBox>
) )
} }
LoginBox.defaultProps = { manual: false } LoginBox.defaultProps = { manual: false, large: false }
export default LoginBox export default LoginBox
...@@ -33,7 +33,7 @@ export default function LoginPage() { ...@@ -33,7 +33,7 @@ export default function LoginPage() {
<Container <Container
sx={{ sx={{
display: 'flex', display: 'flex',
justifyContent: 'space-between', justifyContent: 'space-around',
flexDirection: { xs: 'column', md: 'row' }, flexDirection: { xs: 'column', md: 'row' },
alignItems: 'center', alignItems: 'center',
}} }}
......
...@@ -6,7 +6,7 @@ import Loading from 'components/loading' ...@@ -6,7 +6,7 @@ import Loading from 'components/loading'
import { useUserContext } from 'contexts' import { useUserContext } from 'contexts'
import { submitJsonOpts } from 'utils' import { submitJsonOpts } from 'utils'
import LoginBox from 'components/loginBox' import LoginBox from 'components/loginBox'
import { Box } from '@mui/material' import { Container } from '@mui/material'
function ChooseRegistrationMethod() { function ChooseRegistrationMethod() {
const { t } = useTranslation(['invite']) const { t } = useTranslation(['invite'])
...@@ -15,9 +15,16 @@ function ChooseRegistrationMethod() { ...@@ -15,9 +15,16 @@ function ChooseRegistrationMethod() {
<Page> <Page>
<h1>{t('header')}</h1> <h1>{t('header')}</h1>
<p>{t('description')}</p> <p>{t('description')}</p>
<Box> <Container
<LoginBox header={t('guest')} info={t('guestInfo')} manual /> sx={{
</Box> display: 'flex',
justifyContent: 'space-around',
flexDirection: { xs: 'column', md: 'row' },
alignItems: 'center',
}}
>
<LoginBox header={t('guest')} info={t('guestInfo')} manual large />
</Container>
</Page> </Page>
) )
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment