Skip to content

Commit

Permalink
making DropdownItem type generic
Browse files Browse the repository at this point in the history
  • Loading branch information
besdar committed Jan 17, 2025
1 parent 9b80206 commit 571bc4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { KeyboardKey } from '@standardnotes/ui-services'

type DropdownProps<T extends string> = {
label: string
items: DropdownItem[]
items: DropdownItem<T>[]
value: T
onChange: (value: T) => void
disabled?: boolean
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { IconType } from '@standardnotes/snjs'

export type DropdownItem = {
export type DropdownItem<T extends string> = {
icon?: IconType
iconClassName?: string
label: string
value: string
value: T
disabled?: boolean
}

0 comments on commit 571bc4f

Please sign in to comment.