Skip to content

Commit

Permalink
fix(navbar): correct newsletter bar issue on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasbenary committed Nov 27, 2024
1 parent 51b3959 commit c02d3b7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,20 @@ const StyledCard = ({ href, title, description }: { href: string; title: string;
);
};

const NewsletterBanner = styled.div<{ isSidebarExpanded: boolean,deviceType:string }>`
const NewsletterBanner = styled.div<{ isSidebarExpanded: boolean; deviceType: string }>`
background-color: #0072ce;
color: white;
padding: 8px;
text-align: center;
font-size: 14px;
position: absolute;
top: 0;
left: ${(p) => p.deviceType === 'mobile' ? 0:(p.isSidebarExpanded ? 'var(--sidebar-width-expanded)' : 'var(--sidebar-width-collapsed)')};
left: ${(p) =>
p.deviceType === 'mobile'
? 0
: p.isSidebarExpanded
? 'var(--sidebar-width-expanded)'
: 'var(--sidebar-width-collapsed)'};
transition: all var(--sidebar-expand-transition-speed);
right: 0;
Expand Down

0 comments on commit c02d3b7

Please sign in to comment.