@sankei-arc-shared-components/element_oembed
v0.1.6
Published
Component that renders a social share oEmbed
Downloads
75
Readme
Oembed Component
How do I use it?
This is a component meant to be used to embed content from third-party sites, such as social media sharing.
This is an example of how you could use the component.
import Oembed from "@sankei-arc-shared-components/element_oembed";
const OembedWrapper = (props) => {
return <Oembed
className="twitter-embed"
subtype="twitter"
rawOembed={{
url: "https://x.com/washingtonpost/status/1058446177379725314",
html: `<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">Perspective: Hey, don’t make me perform! Sometimes, interactive theater goes too far. <a href="https://t.co/BBJshE38lJ">https://t.co/BBJshE38lJ</a></p>— Washington Post (@washingtonpost) <a href="https://x.com/washingtonpost/status/1058446177379725314?ref_src=twsrc%5Etfw">November 2, 2018</a></blockquote>
<script async src="https://platform.x.com/widgets.js" charset="utf-8"></script>`
}}
/>;
};
Take a look in the src/index.mdx
file to see suggested implementations.