-
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.
UnitControl component: Refactor JSX components to TypeScript (#35281)
* UnitControl component: Refactor UnitSelectControl to TypeScript * Update size to selectSize to avoid conflict with the size HTML attribute of the Select element Co-authored-by: Marco Ciampini <[email protected]> * Fix typo in Readme * Convert main UnitControl component to TS, add additional types * Update UnitControlOnChangeCallback to inherit from InputChangeCallback Co-authored-by: Marco Ciampini <[email protected]> * Remove optional chaining from parsedValue * Tidy up UnitControlProps type and inherit from UnitSelectControlProps * Add type to handleOnBlur Co-authored-by: Marco Ciampini <[email protected]> * Use WordPressComponentProps type * Add JSDoc comment on exported UnitControl component Co-authored-by: Marco Ciampini <[email protected]> * Add comments to types * Update isUnitSelectTabbable prop to be optional Co-authored-by: Marco Ciampini <[email protected]> * Add defaults to JSDoc comments, update headings in Readme to use TypeScript style type description * Refactor to `WPUnitControlUnitList` type * Update type for Value and reword the description Co-authored-by: Marco Ciampini <[email protected]>
- Loading branch information
1 parent
1961b03
commit 0160b7f
Showing
9 changed files
with
271 additions
and
142 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
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
Oops, something went wrong.