Skip to content

Commit

Permalink
Added top margin to nav without session (#5655)
Browse files Browse the repository at this point in the history
  • Loading branch information
JedWatson committed May 10, 2021
1 parent ffd3543 commit fc9c3d5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/mighty-impalas-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@keystone-next/admin-ui": patch
---

Fixed navigation margin when session isn't configured
6 changes: 4 additions & 2 deletions packages-next/admin-ui/src/components/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ const AuthenticatedItem = ({ item }: { item: { id: string; label: string } }) =>
display: 'flex',
flexDirection: 'row',
justifyContent: 'space-between',
padding: spacing.xlarge,
margin: spacing.xlarge,
marginBottom: 0,
}}
>
<div css={{ fontSize: typography.fontSize.small }}>
Expand Down Expand Up @@ -127,6 +128,7 @@ export const Navigation = () => {
authenticatedItem,
visibleLists,
} = useKeystone();
const { spacing } = useTheme();

return (
<div
Expand All @@ -139,7 +141,7 @@ export const Navigation = () => {
{authenticatedItem.state === 'authenticated' && (
<AuthenticatedItem item={authenticatedItem} />
)}
<nav>
<nav css={{ marginTop: spacing.xlarge }}>
<NavItem href="/">Dashboard</NavItem>
{(() => {
if (visibleLists.state === 'loading') return null;
Expand Down

1 comment on commit fc9c3d5

@vercel
Copy link

@vercel vercel bot commented on fc9c3d5 May 10, 2021

Choose a reason for hiding this comment

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

Please sign in to comment.