Skip to content

Commit 7d7fbc3

Browse files
isubrotogitbutler-client
authored andcommitted
fix(dropdown): Refactor dropdown to pure menu component
Completely rework dropdown component to focus on menu behavior: - Remove selection state and multiple select - Add support for navigation links - Simplify component structure - Enhance menu item flexibility with href and onSelect - Update examples to demonstrate new menu-centric approach - Remove checkmarks and complex selection logic - Improve component documentation This change transforms the dropdown into a more flexible navigation and action menu component with clearer separation of concerns.
1 parent fb21b1f commit 7d7fbc3

File tree

4 files changed

+586
-570
lines changed

4 files changed

+586
-570
lines changed

src/components/Dropdown/Dropdown.types.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,11 @@ export interface DropdownProps {
2525
children?: React.ReactNode;
2626

2727
// State
28-
value?: string | string[];
29-
defaultValue?: string | string[];
30-
onChange?: (value: string | string[]) => void;
3128
open?: boolean;
3229
defaultOpen?: boolean;
3330
onOpenChange?: (open: boolean) => void;
3431

3532
// Behavior
36-
multiple?: boolean;
3733
closeOnSelect?: boolean;
3834
modal?: boolean;
3935

@@ -69,7 +65,6 @@ export interface DropdownProps {
6965
// Advanced
7066
commandPalette?: boolean;
7167
grouped?: boolean;
72-
checkmarks?: boolean;
7368
disabled?: boolean;
7469
loading?: boolean;
7570
emptyMessage?: string;
@@ -111,6 +106,8 @@ export interface DropdownItemProps {
111106
disabled?: boolean;
112107
divider?: boolean;
113108
header?: boolean;
109+
href?: string;
110+
target?: "_blank" | "_self" | "_parent" | "_top";
114111
children?: React.ReactNode;
115112
onSelect?: (value: string) => void;
116113
className?: string;

0 commit comments

Comments
 (0)