-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage.tsx
More file actions
63 lines (58 loc) · 1.81 KB
/
Copy pathpage.tsx
File metadata and controls
63 lines (58 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import { SLIDESHOW_GITHUB_URL } from "./constants";
import { Button } from "@/components/ui/button";
import { SlideshowCards } from "./SlideshowCards";
import Link from "next/link";
import { ButtonComponent } from "@/app/design-system/button/ButtonComponent";
import {
ButtonSizeVariantType,
ButtonThemeVariantType,
} from "@/app/design-system/button/types";
import { GitHubLogoIcon } from "@radix-ui/react-icons";
import { Divider } from "@/app/components/Divider";
export const metadata = {
title: "Slideshow | React Snippets",
description:
"An implementation of a card which creates a slideshow when you hover on the card.",
keywords: [
"slidehow",
"hover",
"media-card",
"react-snippets",
"web development",
"frontend",
"snippets",
"react.js",
],
};
const Slideshow = () => {
return (
<div className="flex flex-col gap-8 h-full p-4 text-xs md:text-sm ">
<div className="my-2 leading-6">
A minimal react component which makes use of{" "}
<span className="font-medium italic">setInterval()</span> and{" "}
<span className="font-medium italic">mouse-events</span> to create a
slideshow when you hover over the individual cards.
</div>
<div className="flex justify-end">
<Link href={SLIDESHOW_GITHUB_URL} target="_blank">
<ButtonComponent
theme={ButtonThemeVariantType.SECONDARY}
size={ButtonSizeVariantType.SM}
>
<GitHubLogoIcon />
<span>Code</span>
</ButtonComponent>
</Link>
</div>
<Divider />
<div className="flex flex-wrap gap-10 justify-center">
{Array(4)
.fill("")
.map((_, index) => (
<SlideshowCards key={index} />
))}
</div>
</div>
);
};
export default Slideshow;