Last active
June 6, 2020 12:57
-
-
Save janjakubnanista/bc616bbc7fc722377ada0418e4b46644 to your computer and use it in GitHub Desktop.
Generic function component 1: props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface SelectProps<T> { | |
// The list of items | |
items: T[]; | |
// The selected item | |
value?: T; | |
// And our change handler | |
onChange: (value: T) => void; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment