diff --git a/src/components/OdyseeVideo.tsx b/src/components/OdyseeVideo.tsx new file mode 100644 index 0000000..adf2758 --- /dev/null +++ b/src/components/OdyseeVideo.tsx @@ -0,0 +1,24 @@ +import cx from 'classnames'; + +import type { FunctionalComponent } from 'preact'; + +interface Props { + class?: string; + id: string; +} + +export const OdyseeVideo: FunctionalComponent = ({ class: className, id, ...props }) => { + const classes = cx('relative aspect-video mbe-10', className); + + return ( +
+ +
+ ); +}; diff --git a/src/components/YouTubeVideo.tsx b/src/components/YouTubeVideo.tsx new file mode 100644 index 0000000..3e03b9f --- /dev/null +++ b/src/components/YouTubeVideo.tsx @@ -0,0 +1,24 @@ +import cx from 'classnames'; + +import type { FunctionalComponent } from 'preact'; + +interface Props { + class?: string; + id: string; +} + +export const YouTubeVideo: FunctionalComponent = ({ class: className, id, ...props }) => { + const classes = cx('relative aspect-video mbe-10', className); + + return ( +
+ +
+ ); +}; diff --git a/src/components/index.ts b/src/components/index.ts index 5ea1d45..3bc44e0 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -11,6 +11,7 @@ export * from './LegalDate'; export * from './Link'; export * from './ListItem'; export * from './NetflixFlag'; +export * from './OdyseeVideo'; export * from './OrderedList'; export * from './PrimeVideoFlag'; export * from './Subheadline'; @@ -20,3 +21,4 @@ export * from './TextLink'; export * from './Title'; export * from './UnorderedList'; export * from './Verse'; +export * from './YouTubeVideo'; diff --git a/src/mdx-components.ts b/src/mdx-components.ts index 05881f1..53e4549 100644 --- a/src/mdx-components.ts +++ b/src/mdx-components.ts @@ -1,6 +1,7 @@ import { AffiliateLink, AmazonBook, + Banner, Book, ColorSwatch, Divider, @@ -9,6 +10,7 @@ import { Image, ListItem, NetflixFlag, + OdyseeVideo, OrderedList, PrimeVideoFlag, Subheadline, @@ -18,6 +20,7 @@ import { Title, UnorderedList, Verse, + YouTubeVideo, } from './components'; export const mapping = { @@ -39,8 +42,10 @@ export const mapping = { li: ListItem, ol: OrderedList, NetflixFlag, + OdyseeVideo, p: Text, ul: UnorderedList, PrimeVideoFlag, Verse, + YouTubeVideo, };