chore(FileUpload): convert examples to TypeScript/functional components#7514
Merged
tlabaj merged 2 commits intopatternfly:mainfrom Jun 13, 2022
Merged
chore(FileUpload): convert examples to TypeScript/functional components#7514tlabaj merged 2 commits intopatternfly:mainfrom
tlabaj merged 2 commits intopatternfly:mainfrom
Conversation
Collaborator
|
Preview: https://patternfly-react-pr-7514.surge.sh A11y report: https://patternfly-react-pr-7514-a11y.surge.sh |
nicolethoen
reviewed
Jun 8, 2022
| const [value, setValue] = React.useState(null); | ||
| const [filename, setFilename] = React.useState(''); | ||
|
|
||
| const handleFileInputChange = (_event, file) => { |
Contributor
There was a problem hiding this comment.
Could you also add types to the parameters of all these helper functions that are passed as props to the component? It helps us check that our components are handling the prop types correctly and helps communicate more clearly to the consumers which types they should be using.
Contributor
Author
There was a problem hiding this comment.
Sounds great! I just typed all of the helper functions :D
nicolethoen
approved these changes
Jun 10, 2022
Collaborator
|
Your changes have been released in:
Thanks for your contribution! 🎉 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What: Closes #7465 -- All examples for the File Upload component have been converted from JavaScript to TypeScript. Additionally, all class components have been converted into functional components.
Additional issues: N/A