Added DeviceTile
This commit is contained in:
parent
19b075058e
commit
5ec6a19f09
3 changed files with 55 additions and 200 deletions
21
src/components/DeviceTile.tsx
Normal file
21
src/components/DeviceTile.tsx
Normal file
|
@ -0,0 +1,21 @@
|
|||
import { Show } from "solid-js";
|
||||
|
||||
function DeviceTile(props: { href?: string; name: string; src: string }) {
|
||||
return (
|
||||
<a href={props.href ?? "soon.HTML"}>
|
||||
<div class="raster">
|
||||
<h3>{props.name}</h3>
|
||||
<Show when={props.src.startsWith("/images")}>
|
||||
<img src={props.src} alt={props.name} />
|
||||
</Show>
|
||||
<Show when={props.src.startsWith("/videos")}>
|
||||
<video width="auto" height="auto" autoplay muted loop>
|
||||
<source src={props.src} type="video/mp4" />
|
||||
</video>
|
||||
</Show>
|
||||
</div>
|
||||
</a>
|
||||
);
|
||||
}
|
||||
|
||||
export default DeviceTile;
|
Loading…
Add table
Add a link
Reference in a new issue