fix logo alignment on small screens; closes #258

This commit is contained in:
thatmattlove 2024-06-01 15:40:49 -04:00
parent aab4ada723
commit 6b37ce96f6
2 changed files with 4 additions and 6 deletions

View file

@ -1,6 +1,6 @@
import { Flex, ScaleFade } from '@chakra-ui/react';
import { motionChakra } from '~/elements';
import { useBooleanValue, useFormInteractive, useBreakpointValue } from '~/hooks';
import { useBooleanValue, useBreakpointValue, useFormInteractive } from '~/hooks';
import { Title } from './title';
const Wrapper = motionChakra('header', {
@ -16,8 +16,6 @@ export const Header = (): JSX.Element => {
{ base: '75%', lg: '75%' },
);
const justify = useBreakpointValue({ base: 'flex-start', lg: 'center' });
return (
<Wrapper layout="position">
<ScaleFade in initialScale={0.5} style={{ width: '100%' }}>
@ -25,8 +23,8 @@ export const Header = (): JSX.Element => {
height="100%"
maxW={titleWidth}
// This is here for the logo
justifyContent={justify}
mx={{ base: formInteractive ? 'auto' : 0, lg: 'auto' }}
justifyContent="center"
mx="auto"
>
<Title />
</Flex>

View file

@ -46,7 +46,7 @@ const DWrapper = (props: DWrapperProps): JSX.Element => {
animate={formInteractive}
transition={{ damping: 15, type: 'spring', stiffness: 100 }}
variants={{ results: { scale: 0.5 }, form: { scale: 1 } }}
maxWidth="25%"
maxWidth="75%"
{...props}
/>
);