From 4838df315931bb883f704ec3e1abe2685f296cdf Mon Sep 17 00:00:00 2001
From: HsiangNianian <admin@jyunko.cn>
Date: Sat, 22 Apr 2023 19:52:26 +0800
Subject: 😀
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 docs/components/ExamplesArea.tsx | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 docs/components/ExamplesArea.tsx

(limited to 'docs/components/ExamplesArea.tsx')

diff --git a/docs/components/ExamplesArea.tsx b/docs/components/ExamplesArea.tsx
new file mode 100644
index 0000000..8b38263
--- /dev/null
+++ b/docs/components/ExamplesArea.tsx
@@ -0,0 +1,30 @@
+import { useSSG } from "nextra/ssg";
+import { DetailedFeatureLink } from "./Feature";
+import { GitHubIcon } from "./Icons";
+
+export const ExamplesArea = ({
+  filter = "featured",
+}: {
+  filter: "featured" | "all";
+}) => {
+  const { examples } = useSSG();
+
+  return (
+    <div className="grid grid-cols-1 mt-12 gap-x-6 gap-y-12 sm:grid-cols-2 lg:mt-16 lg:gap-x-8 lg:gap-y-12">
+      {examples
+        .filter(({ featured }) => (filter === "featured" ? featured : true))
+        .map(({ name, description, slug }) => (
+          <DetailedFeatureLink
+            key={name}
+            feature={{
+              Icon: GitHubIcon,
+              description,
+              name,
+            }}
+            target="_blank"
+            href={`https://github.com/vercel/turbo/tree/main/examples/${slug}`}
+          />
+        ))}
+    </div>
+  );
+};
-- 
cgit v1.2.3-70-g09d2

