Skip to content

Commit

Permalink
At end boolean to handle active styles at nav link
Browse files Browse the repository at this point in the history
  • Loading branch information
camilovegag committed Apr 29, 2024
1 parent 3cf3db3 commit b17e7d2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/berlin/src/components/nav-button/NavButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ type NavButtonProps = {
$color?: 'primary' | 'secondary';
children: React.ReactNode;
onClick?: () => void;
end?: boolean;
};

function NavButton({ to, children, $color = 'primary', onClick }: NavButtonProps) {
function NavButton({ to, children, end, $color = 'primary', onClick }: NavButtonProps) {
return (
<StyledNavLink to={to} tabIndex={-1}>
<StyledNavLink to={to} tabIndex={-1} end={end}>
<Button onClick={onClick} $color={$color}>
{children}
</Button>
Expand Down

0 comments on commit b17e7d2

Please sign in to comment.