Skip to content

Commit 571bc4f

Browse files
committed
making DropdownItem type generic
1 parent 9b80206 commit 571bc4f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/web/src/javascripts/Components/Dropdown/Dropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { KeyboardKey } from '@standardnotes/ui-services'
66

77
type DropdownProps<T extends string> = {
88
label: string
9-
items: DropdownItem[]
9+
items: DropdownItem<T>[]
1010
value: T
1111
onChange: (value: T) => void
1212
disabled?: boolean
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { IconType } from '@standardnotes/snjs'
22

3-
export type DropdownItem = {
3+
export type DropdownItem<T extends string> = {
44
icon?: IconType
55
iconClassName?: string
66
label: string
7-
value: string
7+
value: T
88
disabled?: boolean
99
}

0 commit comments

Comments
 (0)