justinmahar / react-social-media-embed

📰 Easily embed social media posts from Facebook, Instagram, LinkedIn, Pinterest, TikTok, X (Twitter), and YouTube in React.
https://justinmahar.github.io/react-social-media-embed/
MIT License
228 stars 30 forks source link

Enhancement: Added support for 'captioned' prop in InstagramEmbed component #57

Closed matbrgz closed 12 months ago

matbrgz commented 1 year ago

I've added support for the 'captioned' prop in the InstagramEmbed component. Now, users have the option to specify whether they want captions to be displayed or not.

How it works: When the 'captioned' prop is set to true, the component behaves as before and displays captions as usual.

When the 'captioned' prop is set to false, the component will no longer include the data-instgrm-captioned attribute in the generated blockquote, effectively hiding captions.

Testing: I've thoroughly tested this enhancement and achieved excellent results. It provides users with more flexibility in customizing their Instagram embeds.

Please feel free to review the code changes in the pull request. I'm confident this enhancement will improve the overall user experience with the InstagramEmbed component.

Closes: https://github.com/justinmahar/react-social-media-embed/issues/46

Looking forward to your feedback!

Best regards,

johannDeLaCruz commented 1 year ago

hello! I can't seem to make it work though, for some reason the captions are still rendered. Am I using it right? Thank you!

 <InstagramEmbed
            url="https://www.instagram.com/p/CyJiBYtPcC3/"
            width={328}
            captioned="false"
          />