-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: breadcrumb component improvement (#3537)
* chore: breadcrumb component improvement * chore: code refactor
- Loading branch information
1 parent
7d08a57
commit 67cf178
Showing
28 changed files
with
480 additions
and
323 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { Tooltip } from "@plane/ui"; | ||
import Link from "next/link"; | ||
|
||
type Props = { | ||
label?: string; | ||
href?: string; | ||
icon?: React.ReactNode | undefined; | ||
}; | ||
|
||
export const BreadcrumbLink: React.FC<Props> = (props) => { | ||
const { href, label, icon } = props; | ||
return ( | ||
<Tooltip tooltipContent={label} position="bottom"> | ||
<li className="flex items-center space-x-2"> | ||
<div className="flex flex-wrap items-center gap-2.5"> | ||
{href ? ( | ||
<Link | ||
className="flex items-center gap-1 text-sm font-medium text-custom-text-300 hover:text-custom-text-100" | ||
href={href} | ||
> | ||
{icon && ( | ||
<div className="flex h-5 w-5 items-center justify-center overflow-hidden !text-[1rem]">{icon}</div> | ||
)} | ||
<div className="relative line-clamp-1 block max-w-[150px] overflow-hidden truncate">{label}</div> | ||
</Link> | ||
) : ( | ||
<div className="flex cursor-default items-center gap-1 text-sm font-medium text-custom-text-100"> | ||
{icon && <div className="flex h-5 w-5 items-center justify-center overflow-hidden">{icon}</div>} | ||
<div className="relative line-clamp-1 block max-w-[150px] overflow-hidden truncate">{label}</div> | ||
</div> | ||
)} | ||
</div> | ||
</li> | ||
</Tooltip> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from "./product-updates-modal"; | ||
export * from "./empty-state"; | ||
export * from "./latest-feature-block"; | ||
export * from "./breadcrumb-link"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.