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
14 changes: 7 additions & 7 deletions airflow-core/src/airflow/ui/src/layouts/Nav/NavButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ export const NavButton = ({ icon, isExternal = false, title, to, ...rest }: NavB
<Box fontSize="xs">{title}</Box>
</Button>
) : isExternal ? (
<Link href={to} px={2} rel="noopener noreferrer" target="_blank">
<Button {...styles} variant="ghost" {...rest}>
<Box alignSelf="center">{icon}</Box>
<Box fontSize="xs">{title}</Box>
</Button>
</Link>
) : (
<NavLink to={to}>
{({ isActive }: { readonly isActive: boolean }) => (
<Button {...styles} variant={isActive ? "solid" : "ghost"} {...rest}>
Expand All @@ -53,11 +60,4 @@ export const NavButton = ({ icon, isExternal = false, title, to, ...rest }: NavB
</Button>
)}
</NavLink>
) : (
<Link href={to} px={2} rel="noopener noreferrer" target="_blank">
<Button {...styles} variant="ghost" {...rest}>
<Box alignSelf="center">{icon}</Box>
<Box fontSize="xs">{title}</Box>
</Button>
</Link>
);