Skip to content

Commit 80f0047

Browse files
authored
improvement(docs): added images and videos to quick references (#3004)
* improvement(docs): added images and videos to quick references * moved mp4s to blob, completed quick reference guide
1 parent c140e90 commit 80f0047

31 files changed

+378
-99
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
'use client'
2+
3+
import { getAssetUrl } from '@/lib/utils'
4+
5+
interface ActionImageProps {
6+
src: string
7+
alt: string
8+
}
9+
10+
interface ActionVideoProps {
11+
src: string
12+
alt: string
13+
}
14+
15+
export function ActionImage({ src, alt }: ActionImageProps) {
16+
const resolvedSrc = getAssetUrl(src.startsWith('/') ? src.slice(1) : src)
17+
18+
return (
19+
<img
20+
src={resolvedSrc}
21+
alt={alt}
22+
className='inline-block w-full max-w-[200px] rounded border border-neutral-200 dark:border-neutral-700'
23+
/>
24+
)
25+
}
26+
27+
export function ActionVideo({ src, alt }: ActionVideoProps) {
28+
const resolvedSrc = getAssetUrl(src.startsWith('/') ? src.slice(1) : src)
29+
30+
return (
31+
<video
32+
src={resolvedSrc}
33+
autoPlay
34+
loop
35+
muted
36+
playsInline
37+
className='inline-block w-full max-w-[200px] rounded border border-neutral-200 dark:border-neutral-700'
38+
/>
39+
)
40+
}

0 commit comments

Comments
 (0)