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

feat(component): add SideNavItems.tsx component #14808

Closed
wants to merge 1 commit into from

Conversation

Nirajsah
Copy link
Contributor

@Nirajsah Nirajsah commented Oct 7, 2023

Closes #13603

Detailed Description

  • In this pull request, I've introduced a new component file SideNavItems.tsx along with the necessary TypeScript types to ensure type safety. While working on this component, I encountered an issue related to the isSideNavExpanded prop, where TypeScript was throwing an error: "Object literal may only specify known properties, and 'isSideNavExpanded' does not exist in type 'Partial & Attributes." To resolve the issue, I explicitly instructed TypeScript to infer the type as HTMLUListElement, ensuring proper handling of the prop.

New

  • Added a new file SideNavItems.tsx along with its corresponding TypeScript types.
    Issue Resolution
  • Addressed an issue where TypeScript was complaining about the isSideNavExpanded prop by explicitly instructing TS to infer the type.

Changed

  • None

Removed

  • Removed the SideNavItems.propTypes block as it is no longer required with TypeScript providing type checking.

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:

  • Examining the new SideNavItems.tsx file and its associated TypeScript types for correctness and completeness.
  • Confirming that the issue related to the isSideNavExpanded prop has been successfully resolved.
  • Ensuring that the removal of the SideNavItems.propTypes block does not introduce any new issues, as TypeScript now handles type checking.

@Nirajsah Nirajsah requested a review from a team as a code owner October 7, 2023 16:15
@netlify
Copy link

netlify bot commented Oct 7, 2023

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit c9a036e
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/6521843cd7f3b00008bf6fa6
😎 Deploy Preview https://deploy-preview-14808--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Oct 7, 2023

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit c9a036e
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/6521843c33420f000969a728
😎 Deploy Preview https://deploy-preview-14808--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Nirajsah
Copy link
Contributor Author

Nirajsah commented Oct 7, 2023

test failed, i am closing the PR, I'll try to fix the issue 🥲

@Nirajsah Nirajsah closed this Oct 7, 2023
@Nirajsah Nirajsah deleted the SideNavItems branch October 7, 2023 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add TypeScript types to SideNavItems
1 participant