Skip to content

Commit

Permalink
fix: Breadcrumbs should not wrap (#599)
Browse files Browse the repository at this point in the history
* fix breadcrumb wrapping

* add changeset
  • Loading branch information
shuding committed Jul 27, 2022
1 parent 3e3b0a9 commit c8bb94f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/two-actors-beam.md
@@ -0,0 +1,5 @@
---
'nextra-theme-docs': patch
---

UI adjustments
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -6,8 +6,8 @@
"types": "turbo run types",
"types:check": "turbo run types:check",
"dev:core": "turbo run dev --filter=\"nextra\"",
"dev:theme-blog": "turbo run dev --filter=\"blog\" --include-dependencies",
"dev:theme-docs": "turbo run dev --filter=\"swr-site\" --include-dependencies",
"dev:theme-blog": "turbo run dev --filter=\"blog\" --filter=\"nextra\" --filter=\"nextra-theme-blog\"",
"dev:theme-docs": "turbo run dev --filter=\"swr-site\" --filter=\"nextra\" --filter=\"nextra-theme-docs\"",
"build:core": "pnpm run build --filter=\"nextra\"",
"build:theme-blog": "pnpm run build --filter=\"nextra-theme-blog\"",
"build:theme-docs": "pnpm run build --filter=\"nextra-theme-docs\"",
Expand Down
6 changes: 3 additions & 3 deletions packages/nextra-theme-docs/src/breadcrumb.tsx
Expand Up @@ -20,13 +20,13 @@ export default function Breadcrumb({ activePath }: { activePath: Item[] }) {
) : null}
<div
className={cn(
'transition-colors hover:text-gray-900 dark:hover:text-gray-200',
'transition-colors hover:text-gray-900 dark:hover:text-gray-200 whitespace-nowrap',
{
'active text-gray-600 dark:text-gray-400': isActive,
'min-w-[24px] overflow-hidden text-ellipsis whitespace-nowrap':
!isActive
'min-w-[24px] overflow-hidden text-ellipsis': !isActive
}
)}
title={item.title}
>
{isLink && !isActive ? (
<Link href={item.route}>
Expand Down
2 changes: 1 addition & 1 deletion packages/nextra-theme-docs/src/navbar.tsx
Expand Up @@ -166,7 +166,7 @@ export default function Navbar({ flatDirectories, items }: NavBarProps) {
) : null}

<button
className="nextra-menu-icon block p-2 md:hidden"
className="nextra-menu-icon block p-2 -mr-2 md:hidden"
onClick={() => setMenu(!menu)}
>
<MenuIcon className={cn({ open: menu })} />
Expand Down

0 comments on commit c8bb94f

Please sign in to comment.