Skip to content

Commit

Permalink
feat(breadcrumb): tooltip for organization logo
Browse files Browse the repository at this point in the history
  • Loading branch information
RemiBonnet committed Dec 27, 2022
1 parent c4fc885 commit 3825c7f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
25 changes: 14 additions & 11 deletions libs/shared/ui/src/lib/components/layouts/breadcrumb/breadcrumb.tsx
Expand Up @@ -25,6 +25,7 @@ import Icon from '../../icon/icon'
import { IconAwesomeEnum } from '../../icon/icon-awesome.enum'
import { MenuItemProps } from '../../menu/menu-item/menu-item'
import StatusChip from '../../status-chip/status-chip'
import Tooltip from '../../tooltip/tooltip'
import BreadcrumbItem from '../breadcrumb-item/breadcrumb-item'

export interface BreadcrumbProps {
Expand Down Expand Up @@ -170,17 +171,19 @@ export function BreadcrumbMemo(props: BreadcrumbProps) {
<div className="flex justify-between w-full">
<div className="flex h-full items-center">
{organizationId && (
<div className="mr-2">
{currentOrganization?.logo_url ? (
<img
src={currentOrganization?.logo_url}
className="h-4"
alt={`${currentOrganization?.name} organization`}
/>
) : (
squareContent(currentOrganization?.name.charAt(0), '')
)}
</div>
<Tooltip content={currentOrganization?.name || ''}>
<div className="mr-2">
{currentOrganization?.logo_url ? (
<img
src={currentOrganization?.logo_url}
className="h-4"
alt={`${currentOrganization?.name} organization`}
/>
) : (
squareContent(currentOrganization?.name.charAt(0), '')
)}
</div>
</Tooltip>
)}
{clusterId && (
<BreadcrumbItem
Expand Down
1 change: 1 addition & 0 deletions libs/shared/ui/src/lib/components/menu/menu.tsx
Expand Up @@ -143,6 +143,7 @@ export function Menu(props: MenuProps) {
onClose={(e) => handleClick(e)}
anchorRef={ref}
align={arrowAlign}
viewScroll="close"
className="menu z-20"
menuClassName={`rounded-md shadow-[0_0_32px_rgba(0,0,0,0.08)] p-0 ${className} menu__container menu__container--${direction} menu__container--${
isOpen ? 'open' : 'closed'
Expand Down

0 comments on commit 3825c7f

Please sign in to comment.