saurabhnemade / react-twitter-embed

Simplest way to add twitter widgets to your react project.
https://saurabhnemade.github.io/react-twitter-embed/
371 stars 66 forks source link

Also export component props? #132

Closed JoshuaKGoldberg closed 9 months ago

JoshuaKGoldberg commented 1 year ago

👋 Hi! I just learned about this library, and it's great - thanks for making it!

I'm working on it in a TypeScript codebase and want to refer to the type of props for a component (e.g. the TwitterTweetEmbedProps interface corresponding to TwitterTweetEmbed). But the props types aren't exported in dist/index.d.ts. Could they be, please?

- import TwitterTweetEmbed from './components/TwitterTweetEmbed';
+ import TwitterTweetEmbed, { TwitterTweetEmbedProps } from './components/TwitterTweetEmbed'; 

...

- export { ... TwitterTweetEmbed ... };
+ export { ... TwitterTweetEmbed, TwitterTweetEmbedProps ... };

In the meantime, we can use React.ComponentProps<typeof TwitterTweetEmbed> & similar in our components. But that's a lot of code.

I'd be happy to submit a PR! ❤️

JoshuaKGoldberg commented 1 year ago

Ping @saurabhnemade - is this something you'd be up for receiving a PR on?

JoshuaKGoldberg commented 9 months ago

Closing out my old issues for repos I no longer have context on. If anybody has a need for what this issue was asking about, I'd encourage them/you to file a new issue. Cheers!