-
Notifications
You must be signed in to change notification settings - Fork 142
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
refactor(UserProfileImage): added TS types to the component #4773
refactor(UserProfileImage): added TS types to the component #4773
Conversation
❌ Deploy Preview for carbon-for-ibm-products failed.
|
✅ Deploy Preview for carbon-for-ibm-products ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
/** | ||
* When passing the image prop use the imageDescription prop to describe the image for screen reader. | ||
*/ | ||
imageDescription: string; |
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.
This will need to be conditionally required only if image
is provided
/** | ||
* Specify how the trigger should align with the tooltip | ||
*/ | ||
tooltipAlignment?: |
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.
I think you could do something like this
tooltipAlignment?: React.ComponentProps<typeof IconButton>['align'];
f24cbe9
Contributes to #4501
converted the component to ts, and added types.
What did you change?
packages/ibm-products/src/components/UserProfileImage/UserProfileImage.js -> tsx
How did you test and verify your work?
storybook, local verifying the available types on component