Skip to content

Commit

Permalink
fix logo alignment on small screens; closes #258
Browse files Browse the repository at this point in the history
  • Loading branch information
thatmattlove committed Jun 1, 2024
1 parent aab4ada commit 6b37ce9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions hyperglass/ui/components/header/header.tsx
Original file line number Diff line number Diff line change
@@ -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', {
Expand All @@ -16,17 +16,15 @@ 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%' }}>
<Flex
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>
Expand Down
2 changes: 1 addition & 1 deletion hyperglass/ui/components/header/title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
/>
);
Expand Down

0 comments on commit 6b37ce9

Please sign in to comment.