-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
25 additions
and
4 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,34 @@ | ||
// TO DO | ||
export type CustomSelectProps = { | ||
/** | ||
* The children elements. This should be composed | ||
* of CustomSelect.Item components. | ||
*/ | ||
children: React.ReactNode; | ||
/** | ||
* An optional default value for the control. | ||
* If left undefined, the first non-disabled | ||
* item will be used | ||
*/ | ||
defaultValue?: any; | ||
/** | ||
* Label for the control. | ||
*/ | ||
label?: string; | ||
/** | ||
* A function that receives the new value of the input. | ||
*/ | ||
onChange?: Function; | ||
value?: string; | ||
}; | ||
|
||
export type CustomSelectItemProps = { | ||
/** | ||
* The children elements to be displayed for the select options. | ||
*/ | ||
children: React.ReactNode; | ||
/** | ||
* The current value of the select. Can be used in lieu of | ||
* children if only a string is needed. | ||
*/ | ||
value?: any; | ||
}; |