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(containedlist): added index.ts file for type generation #16302

Merged

Conversation

Gururajj77
Copy link
Contributor

Closes #16206

Added index.ts for index.d.ts type generation

Changelog

New

  • added index.ts

Changed

  • added new interface to infer ContainedListItem

Removed

  • removed index.js

Testing / Reviewing

No new perspectives for testing.

@Gururajj77 Gururajj77 requested a review from a team as a code owner May 2, 2024 09:43
Copy link

netlify bot commented May 2, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit acfaf85
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/663c9af2fc99aa0008f8fb91
😎 Deploy Preview https://deploy-preview-16302--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.

Copy link
Contributor

@guidari guidari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

@@ -199,4 +204,6 @@ ContainedList.propTypes = {
size: PropTypes.oneOf(['sm', 'md', 'lg', 'xl']),
};

ContainedList.ContainedListItem = ContainedListItem;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This threw me for a loop, I thought we had deprecated all instances where we were placing subcomponents as fields on the parent component object. Turns out this has been in there since the inception of this component.

It's not something we need to do in this PR, but I think it would make sense to deprecate this like we did for TextInput.PasswordInput here

// what's currently possible, a bit out of convention
<ContainedList>
  <ContainedList.ContainedListItem/>
  <ContainedList.ContainedListItem/>
</ContainedList>

// following the general convention we have would mean 
// it wouldn't be a field on the object. The above 
// wouldn't work, instead:
<ContainedList>
  <ContainedListItem/>
  <ContainedListItem/>
</ContainedList>

I can open a new issue for this 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Gururajj77 Gururajj77 requested a review from a team as a code owner May 9, 2024 09:44
@tay1orjones tay1orjones added this pull request to the merge queue May 9, 2024
Merged via the queue into carbon-design-system:main with commit e70f08d May 9, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Provide Typescript types for ContainedList and ContainedListItem
3 participants