Skip to content

Commit

Permalink
docs: add video component
Browse files Browse the repository at this point in the history
  • Loading branch information
Almouro committed Oct 28, 2024
1 parent 7524bdb commit ddfcac2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
5 changes: 1 addition & 4 deletions website/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ sidebar_position: 1
flashlight measure
```

<video autoPlay muted controls style={{width: "100%"}}>

<source src="https://github.com/bamlab/flashlight/assets/4534323/4038a342-f145-4c3b-8cde-17949bf52612"/>
</video>
<Video url="https://github.com/bamlab/flashlight/assets/4534323/4038a342-f145-4c3b-8cde-17949bf52612"/>

## Going further

Expand Down
7 changes: 7 additions & 0 deletions website/src/components/Video.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from "react";

export const Video = ({ url }: { url: string }) => (
<video autoPlay muted controls style={{ width: "100%" }}>
<source src={url} />
</video>
);
2 changes: 2 additions & 0 deletions website/src/theme/MDXComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
import MDXComponents from "@theme-original/MDXComponents";
import Contact from "@site/src/components/Contact.mdx";
import Install from "@site/src/components/Install.mdx";
import { Video } from "@site/src/components/Video";

const _module = {
...MDXComponents,
Contact,
Install,
Video,
};

export default _module;

0 comments on commit ddfcac2

Please sign in to comment.