-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat(component): add SideNavItems.tsx component #14809
Conversation
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
ci / test:e2e failed running "yarn install --immutable --immutable-cache" |
I closed and then reopened the PR, and this time, all tests passed successfully. It's possible that something may have gone wrong during the initial PR's test run, but the subsequent attempt resulted in the expected test outcomes. |
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.
LGTM! 🚀 Thanks for the contribution!
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 submitting this PR! The .tsx
file should be replacing the .js
one though. There's some docs here on the steps we're taking for each of these components if that's helpful.
Apologies for the formatting error; I've now rectified it.
I've reviewed the documentation and will bear it in mind. |
Separating comments
some checks failed i don't know why, closing the PR. I'll try to reopen the PR for checks |
closing this PR. I'll Make a new PR after everything is fixed |
Closes #13603
Detailed Description
To resolve the issue with TypeScript's type inference, I implemented a solution by explicitly defining the child's type as React.ComponentType. I then checked whether the displayName property existed within childType. This approach ensured that TypeScript correctly recognized and inferred the types, effectively resolving the issue.
In previous PRs, I unintentionally omitted running the tests before making the commits. I acknowledge and apologise for this oversight.
New
Changed
Removed
It's important to note that all other aspects of the SideNavItems.tsx file are functioning as expected, and there are no other issues in the codebase.
Testing / Review
Reviewers can verify the changes in this PR by: