fc535590eb
Build and Deploy Verso / deploy (push) Successful in 14m48s
- project-list-ds-nav.scss: remove display:none for .nav-item-account on desktop — it was hidden because the sidebar handled it, but now the sidebar no longer has the account icon so this made it invisible everywhere - logged-in-items / nav-dropdown-menu: show User icon alongside 'Account' text in navbar dropdown so it's recognisable as an account button - Lumière: remove border-top from .ds-nav-verso-logo (was doubling up with .ds-nav-sidebar-lower border) - Logo hover: drop scale transform in both themes, use filter:brightness only - Gradient: drop background-attachment:fixed (unreliable in scroll containers); switch to circle gradients at 0.60/0.45 opacity; base colour #e8f5f2 - Editor ide-lumiere: rounded square (7px) on .ol-cm-toolbar-button with teal hover/active states to match the Lumière design language Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
import { type ReactNode, useState } from 'react'
|
|
import { Dropdown } from 'react-bootstrap'
|
|
import { CaretUp, CaretDown } from '@phosphor-icons/react'
|
|
import { useDsNavStyle } from '@/features/project-list/components/use-is-ds-nav'
|
|
|
|
export default function NavDropdownMenu({
|
|
title,
|
|
className,
|
|
children,
|
|
onToggle,
|
|
}: {
|
|
title: ReactNode
|
|
className?: string
|
|
children: ReactNode
|
|
onToggle?: (nextShow: boolean) => void
|
|
}) {
|
|
const [show, setShow] = useState(false)
|
|
const dsNavStyle = useDsNavStyle()
|
|
// Can't use a NavDropdown here because it's impossible to render the menu as
|
|
// a <ul> element using NavDropdown
|
|
const Caret = show ? CaretUp : CaretDown
|
|
return (
|
|
<Dropdown
|
|
as="li"
|
|
role="none"
|
|
className={className}
|
|
onToggle={nextShow => {
|
|
setShow(nextShow)
|
|
onToggle?.(nextShow)
|
|
}}
|
|
>
|
|
<Dropdown.Toggle role="menuitem">
|
|
{title}
|
|
{dsNavStyle && <Caret weight="bold" className="ms-2" />}
|
|
</Dropdown.Toggle>
|
|
<Dropdown.Menu as="ul" role="menu" align="end">
|
|
{children}
|
|
</Dropdown.Menu>
|
|
</Dropdown>
|
|
)
|
|
}
|