-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Notice: refactor to TypeScript #47118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
c37a00b
remove from exclude list
chad1008 ee8bbb0
rename js files to js(x), add types.ts
chad1008 4456a8b
add main component prop types
chad1008 b99fc35
update `children` to handle `__unsafeHTML` and JSX elements
chad1008 f9e98d0
fix Button import
chad1008 75e3b3a
add typing to `useSpokenMessage` and `getDefaultPoliteness`
chad1008 a49fb49
type the `event` param of `onDismissNotice`
chad1008 8ab0011
add typing to action mapping arg
chad1008 bf8f7be
add `secondary` and `link` action variants
chad1008 ba475ec
add typing to `NoticeList`
chad1008 1a14810
migrate stories to TypeScript
chad1008 4a91556
add JSDoc example
chad1008 163d7b4
add story demonstrating actions
chad1008 fc7a49d
add story demonstrating JSX children
chad1008 12022b3
update `Snackbar` to import types from `Notice`
chad1008 b5fe417
rename test files to `*.tsx`
chad1008 de29435
unit tests: type `getNoticeWrapper`
chad1008 5fcc88e
add `children` prop values to unit tests
chad1008 bdeb877
update CHANGELOG
chad1008 10347cf
add JSDocs comments to `NoticeListProps`
chad1008 4380512
README: improve design `dos and donts` section readability
chad1008 52c2ddc
README: add horizontal rules between do/dont examples
chad1008 44d5b6d
README: update Props descriptions in README
chad1008 1437ff1
README: remove outdated screenshots and reference to `default` status
chad1008 c96c1aa
whitespace fixes
chad1008 2e1de69
remove `NoticeList` story comment
chad1008 b9963fd
unit test: update jest mocking
chad1008 e9751a9
unit tests: update snapshot
chad1008 508675d
restore JSDoc description for `useSpokenMessage`
chad1008 d85e2b1
remove `WordPressComponentProps` from typing, not really needed here
chad1008 1e6a732
add `NoticeList` n storybook as a subcomponent
chad1008 0385f09
add `NoticeList` JSDoc
chad1008 0c53a19
remove unneeded `argtypes`
chad1008 eec9afe
DRY `ComponentStory` type declarations
chad1008 c82704f
make `NoticeAction` types more specific
chad1008 8506b33
Update packages/components/src/notice/stories/index.tsx
chad1008 5ae653c
Update packages/components/src/notice/stories/index.tsx
chad1008 0342768
`onClick` events typed as `HTMLButtonElement`
chad1008 3a7dcf1
Update packages/components/src/notice/README.md
chad1008 7aa87c4
Update packages/components/src/notice/README.md
chad1008 ff2c6aa
Update packages/components/src/notice/README.md
chad1008 2cc232c
whitespace
chad1008 3d1a13b
Pick from new `Button` types
chad1008 70725f7
default for`NoticeProps[politeness]`
chad1008 08ef1ff
Revert "default for`NoticeProps[politeness]`"
chad1008 8bf4159
sync up docs
chad1008 d43fe8f
improved default for `politeness`
chad1008 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
whitespace
- Loading branch information
commit 2cc232cfd611191f704827d22a999c4acc5696e2
There are no files selected for viewing
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.