-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Dropdown component to TypeScript (#45787)
* Refactor Dropdown component to TypeScript * Correct the text of fail() * Rename RenderProps, as those have a different meaning * Rename EmbeddedComponentProps to CallbackProps * Fix failed unit test * Correct the text to search for * Correct the popoverProps property * Simplify the type of popoverProps * Add types to story exports * Revert changes to index.native.js * Delete index.native.tsx * Use the CallbackProps from types.ts * Pass parameters to stories so there's not a TypeError * Reference the DropdownProps instead of definitin the props again * Move a type import to the other type imports * Change the Dropdown to accept a forwarded ref Might be the wrong approach. * Don't export CallbackProps * Simplify popoverProps * Add a CHANGELOG entry * Commit Lena Morita's suggestion: Update packages/components/src/dropdown/index.tsx Co-authored-by: Lena Morita <[email protected]> * Commit Lena Morita's suggestion: Update packages/components/src/dropdown/stories/index.tsx Co-authored-by: Lena Morita <[email protected]> * Apply Lena Morita's suggestion to let TS infer the return type * Commit Lena Morita's suggestion: Update packages/components/src/dropdown/index.tsx Co-authored-by: Lena Morita <[email protected]> * Define className and style, instead of referencing WordPressComponentProps * Remove expandOnMobile and headerTitle in stories * Commit Lena Morita's suggestion: Update packages/components/src/dropdown/types.ts Co-authored-by: Lena Morita <[email protected]> * Commit Lena Morita's suggestion: Update packages/components/src/dropdown/types.ts Co-authored-by: Lena Morita <[email protected]> * Apply Lena Morita's suggestion use typeof Popover * Commit Lena Morita's suggestion: Update packages/components/src/dropdown/README.md Co-authored-by: Lena Morita <[email protected]> Co-authored-by: Lena Morita <[email protected]>
- Loading branch information
Showing
9 changed files
with
246 additions
and
91 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
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.
79f6e5f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flaky tests detected.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.
🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/3749062015
📝 Reported issues:
Browse all
#45332 inspecs/editor/various/inserting-blocks.test.js