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/Avatar.tsx | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 docs/components/Avatar.tsx

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

diff --git a/docs/components/Avatar.tsx b/docs/components/Avatar.tsx
new file mode 100644
index 0000000..8826daf
--- /dev/null
+++ b/docs/components/Avatar.tsx
@@ -0,0 +1,37 @@
+import Image from "next/image";
+import type { AuthorDetails } from "../content/team";
+
+export const Avatar = ({ name, picture, twitterUsername }: AuthorDetails) => (
+  <div className="flex items-center flex-shrink-0 md:justify-start">
+    <div className="w-[32px] h-[32px]">
+      <Image
+        src={picture}
+        height={32}
+        width={32}
+        title={name}
+        className="w-full rounded-full"
+        alt={name}
+        priority
+      />
+    </div>
+    <dl className="ml-2 text-sm font-medium leading-4 text-left whitespace-no-wrap">
+      <dt className="sr-only">Name</dt>
+      <dd className="text-gray-900 dark:text-white">{name}</dd>
+      {twitterUsername && (
+        <>
+          <dt className="sr-only">Twitter</dt>
+          <dd>
+            <a
+              href={`https://twitter.com/${twitterUsername}`}
+              className="text-xs text-blue-500 no-underline betterhover:hover:text-blue-600 betterhover:hover:underline"
+              target="_blank"
+              rel="noopener noreferrer"
+            >
+              {`@${twitterUsername}`}
+            </a>
+          </dd>
+        </>
+      )}
+    </dl>
+  </div>
+);
-- 
cgit v1.2.3-70-g09d2

