PaulieScanlon / mdx-embed

Embed 3rd party media content in MDX - no import required 🧽
https://mdx-embed.netlify.app/
MIT License
271 stars 30 forks source link

Custom Loader #241

Closed thatanjan closed 2 years ago

thatanjan commented 2 years ago

When I embed something like Tweet, I only see loading text before it gets loaded. How can I add a custom Loading component to display on the page?

Thanks in advance.

spences10 commented 2 years ago

You'll need to add in your spinner/loading component into the other side of the turnery function here: https://github.com/PaulieScanlon/mdx-embed/blob/3d56d5771f6d17f4b78543e6a836648232acb976/packages/mdx-embed/src/components/twitter/tweet.tsx#L31

Or for whatever component you want to show a spinner for.

Thanks

thatanjan commented 2 years ago

Thank you so much @spences10