Skip to content

Commit

Permalink
feat(DropdownMenu): remove switcher
Browse files Browse the repository at this point in the history
  • Loading branch information
u4aew committed Dec 25, 2024
1 parent 264118e commit 5b67a51
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/components/DropdownMenu/DropdownMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ export type DropdownMenuProps<T> = {
* and prevents the menu from being opened.
*/
disabled?: boolean;
/**
* Menu toggle control.
* @deprecated Use renderSwitcher instead
*/
switcher?: React.ReactNode;
/**
* Menu toggle control.
*/
Expand Down Expand Up @@ -106,7 +101,6 @@ const DropdownMenu = <T,>({
hideOnScroll = true,
data,
disabled,
switcher,
renderSwitcher,
switcherWrapperClassName,
defaultSwitcherProps,
Expand Down Expand Up @@ -172,12 +166,11 @@ const DropdownMenu = <T,>({
className={cnDropdownMenu('switcher-wrapper', switcherWrapperClassName)}
{...(renderSwitcher ? {} : switcherProps)}
>
{renderSwitcher?.(switcherProps) || switcher || (
{renderSwitcher?.(switcherProps) || (
<Button
view="flat"
size={size}
// FIXME remove switcher prop and uncomment onClick handler
// onClick={handleSwitcherClick}
onClick={handleSwitcherClick}
{...defaultSwitcherProps}
className={cnDropdownMenu('switcher-button', defaultSwitcherClassName)}
disabled={disabled}
Expand Down

0 comments on commit 5b67a51

Please sign in to comment.