Skip to content
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

Migrate StyledOcticon to TypeScript #993

Merged
merged 5 commits into from
Feb 2, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update propTypes
  • Loading branch information
colebemis committed Jan 29, 2021
commit d4369f0dc16addf677b5b2fb636c480aa69e16d4
4 changes: 2 additions & 2 deletions src/StyledOcticon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ StyledOcticon.defaultProps = {
StyledOcticon.propTypes = {
...COMMON.propTypes,
...sx.propTypes,
icon: PropTypes.elementType.isRequired,
size: PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['small', 'medium', 'large'])]),
icon: PropTypes.any.isRequired,
size: PropTypes.any,
Comment on lines +29 to +30
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These propTypes were causing errors. Since we'll be removing propTypes soon, I think any is fine for now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’d personally go ahead and remove PropTypes from this file, but this is fine too!

theme: PropTypes.object,
verticalAlign: PropTypes.oneOf(['middle', 'text-bottom', 'text-top', 'top'])
}
Expand Down