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

refactor(ErrorEmptyState): added typescript types to the component #4747

Merged

Conversation

devadula-nandan
Copy link
Contributor

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

Copy link

netlify bot commented Apr 4, 2024

👷 Deploy Preview for carbon-for-ibm-products processing.

Name Link
🔨 Latest commit faee728
🔍 Latest deploy log https://app.netlify.com/sites/carbon-for-ibm-products/deploys/66164b658de36100085430c1

@devadula-nandan devadula-nandan marked this pull request as ready for review April 4, 2024 13:28
@devadula-nandan devadula-nandan requested a review from a team as a code owner April 4, 2024 13:28
@devadula-nandan devadula-nandan linked an issue Apr 4, 2024 that may be closed by this pull request
*/
action?: {
kind?: 'primary' | 'secondary' | 'tertiary';
renderIcon?: (() => ReactNode) | object;
Copy link
Member

@matthewgallo matthewgallo Apr 4, 2024

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';

Copy link
Contributor Author

@devadula-nandan devadula-nandan Apr 5, 2024

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.

Copy link
Member

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.

@matthewgallo matthewgallo added this pull request to the merge queue Apr 10, 2024
Merged via the queue into carbon-design-system:main with commit 077f336 Apr 10, 2024
15 checks passed
@devadula-nandan devadula-nandan deleted the nandan-v2-4263 branch April 12, 2024 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Typescript types to ErrorEmptyState
2 participants