-
Notifications
You must be signed in to change notification settings - Fork 292
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
chore: fix Primitive types #4011
Conversation
|
...es/react-liveness/src/components/FaceLivenessDetector/LivenessCheck/LivenessCameraModule.tsx
Show resolved
Hide resolved
...cations/src/components/InAppMessaging/FullScreenMessage/__tests__/FullScreenMessage.test.tsx
Show resolved
Hide resolved
packages/react/src/components/AccountSettings/ChangePassword/ChangePassword.tsx
Outdated
Show resolved
Hide resolved
packages/react/src/components/AccountSettings/ChangePassword/ChangePassword.tsx
Outdated
Show resolved
Hide resolved
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.
🚢
Description of changes
This PR aims to fix the component types to provide typescript users with better type hints.
The PR does the following things:
BaseButtonProps
includes only the custom props defined by ourselves whileButtonProps
includes the custom props plus all button HTML attributes.View
component.to
prop onLink
primitive as part of the clean upFor code reviewers, the major changes are in
view.ts
under thetypes
folder and the rest of them is just boiler plate updates accordingly.React.forwardRef
and overload the JSX constructor to support polymorphic components withas
prop by taking generics.Follow-ups that we want to tackle:
children
prop if necessary for future proof since its implicit declaration has been removed in the latest react types. The PR addschildren
prop toBaseComponentProps
to maintain the same behavior as usual and will not address it altogether considering the scope and priority.Issue #, if available
href
prop #2761Flex as="form"
are not typed properly #2891Description of how you validated changes
Checklist
yarn test
passes and tests are updated/addedsideEffects
field updatedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.