Merge pull request #25923 from overleaf/dp-view-dropdown

Update UI of view dropdown

GitOrigin-RevId: 2d689a73886e0821eaa21e6666092e9414528e55
This commit is contained in:
David
2025-05-27 09:00:16 +01:00
committed by Copybot
parent 338d39284e
commit 2c07e1c44a
2 changed files with 9 additions and 1 deletions
@@ -1,6 +1,7 @@
import {
DropdownDivider,
DropdownHeader,
DropdownItem,
} from '@/features/ui/components/bootstrap-5/dropdown-menu'
import { MenuBar } from '@/shared/components/menu-bar/menu-bar'
import { MenuBarDropdown } from '@/shared/components/menu-bar/menu-bar-dropdown'
@@ -209,13 +210,17 @@ export const ToolbarMenuBar = () => {
className="ide-redesign-toolbar-dropdown-toggle-subdued ide-redesign-toolbar-button-subdued"
>
<ChangeLayoutOptions />
<DropdownDivider />
<DropdownHeader>Editor settings</DropdownHeader>
<MenuBarOption
eventKey="show_equation_preview"
title={t('show_equation_preview')}
trailingIcon={mathPreview ? 'check' : undefined}
leadingIcon={
mathPreview ? 'check' : <DropdownItem.EmptyLeadingIcon />
}
onClick={toggleMathPreview}
/>
<DropdownDivider />
<CommandSection section={pdfControlsMenuSectionStructure} />
</MenuBarDropdown>
<CommandDropdown
@@ -8,6 +8,7 @@ type MenuBarOptionProps = {
title: string
onClick?: MouseEventHandler
disabled?: boolean
leadingIcon?: ReactNode
trailingIcon?: ReactNode
href?: string
target?: string
@@ -20,6 +21,7 @@ export const MenuBarOption = ({
onClick: clickHandler,
href,
disabled,
leadingIcon,
trailingIcon,
target,
rel,
@@ -42,6 +44,7 @@ export const MenuBarOption = ({
onMouseEnter={() => setSelected(null)}
onClick={onClick}
disabled={disabled}
leadingIcon={leadingIcon}
trailingIcon={trailingIcon}
href={href}
rel={rel}