-
Notifications
You must be signed in to change notification settings - Fork 140
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(ErrorEmptyState): added typescript types to the component #4747
refactor(ErrorEmptyState): added typescript types to the component #4747
Conversation
👷 Deploy Preview for carbon-for-ibm-products processing.
|
*/ | ||
action?: { | ||
kind?: 'primary' | 'secondary' | 'tertiary'; | ||
renderIcon?: (() => ReactNode) | object; |
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.
You could use CarbonIconType
here for renderIcon
:
import { CarbonIconType } from '@carbon/react/icons/CarbonIcon';
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.
thanks for the review matt, the changes are implemented.
i have used below import
import { CarbonIconType } from '@carbon/icons-react/lib/CarbonIcon';
as i get "Cannot find module '@carbon/react/icons/CarbonIcon' or its corresponding type declarations." from the suggested one.
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 pulled down your branch locally and don't see that error. Lets merge this and if this pops up we can open an issue and follow up.
077f336
Contributes to #4263
added TS types to the component
What did you change?
packages/ibm-products/src/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.tsx
How did you test and verify your work?
storybook renders as expected
tested locally verifying with different props