Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 26 additions & 19 deletions packages/gamut-labs/src/experimental/GlobalHeader/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Box } from '@codecademy/gamut';
import { useTheme } from '@emotion/react';
import React from 'react';

import { AppHeader } from '../AppHeader';
Expand Down Expand Up @@ -93,22 +94,28 @@ const getMobileAppHeaderItems = (
}
};

export const GlobalHeader: React.FC<GlobalHeaderProps> = (props) => (
<>
<Box display={{ base: 'none', md: 'block' }} height="80">
<AppHeader action={props.action} items={getAppHeaderItems(props)} />
</Box>
<Box
display={{ base: 'block', md: 'none' }}
height="64"
position="relative"
zIndex={0}
>
<AppHeaderMobile
action={props.action}
items={getMobileAppHeaderItems(props)}
renderSearch={props.renderSearch?.mobile}
/>
</Box>
</>
);
export const GlobalHeader: React.FC<GlobalHeaderProps> = (props) => {
const theme = useTheme();
return (
<>
<Box
display={{ base: 'none', md: 'block' }}
height={theme.elements.headerHeight}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wowowow!! wait did @katiezutter know you were working on this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😱

>
<AppHeader action={props.action} items={getAppHeaderItems(props)} />
</Box>
<Box
display={{ base: 'block', md: 'none' }}
height={theme.elements.headerHeight}
position="relative"
zIndex={0}
>
<AppHeaderMobile
action={props.action}
items={getMobileAppHeaderItems(props)}
renderSearch={props.renderSearch?.mobile}
/>
</Box>
</>
);
};