From a2e007e68bbfcf3008ee5d22d4212b71bc9c1777 Mon Sep 17 00:00:00 2001
From: mackt <1033530438@qq.com>
Date: Sat, 23 Mar 2024 00:44:33 +0800
Subject: [PATCH] style: modify compoents directory
---
public/img/icon/close.svg | 4 ++++
src/app/layout.tsx | 3 +--
src/components/{Header/index.tsx => Header.tsx} | 5 ++++-
src/components/common/Input.tsx | 13 +++++++++++++
src/components/index.ts | 9 +++++++++
5 files changed, 31 insertions(+), 3 deletions(-)
create mode 100644 public/img/icon/close.svg
rename src/components/{Header/index.tsx => Header.tsx} (92%)
create mode 100644 src/components/common/Input.tsx
create mode 100644 src/components/index.ts
diff --git a/public/img/icon/close.svg b/public/img/icon/close.svg
new file mode 100644
index 0000000..b82ce16
--- /dev/null
+++ b/public/img/icon/close.svg
@@ -0,0 +1,4 @@
+
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index 0480202..0c4ffb4 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -1,5 +1,4 @@
-import Footer from '@/components/Footer';
-import Header from '@/components/Header';
+import { Header, Footer } from '@/components';
import type { Metadata, Viewport } from 'next';
diff --git a/src/components/Header/index.tsx b/src/components/Header.tsx
similarity index 92%
rename from src/components/Header/index.tsx
rename to src/components/Header.tsx
index 97e5223..74ef219 100644
--- a/src/components/Header/index.tsx
+++ b/src/components/Header.tsx
@@ -3,7 +3,7 @@
import Link from 'next/link';
import { usePathname } from 'next/navigation';
-import Logo from '@/components/Logo';
+import { Logo, LoginCard } from '@/components';
export default function Header() {
const pathName = usePathname();
@@ -42,6 +42,9 @@ export default function Header() {
+
+ {/* 登录框 */}
+ {/* */}
);
diff --git a/src/components/common/Input.tsx b/src/components/common/Input.tsx
new file mode 100644
index 0000000..754fa85
--- /dev/null
+++ b/src/components/common/Input.tsx
@@ -0,0 +1,13 @@
+const Input = ({ type, value, onChange, placeholder, className = '' }) => {
+ return (
+
+ );
+};
+
+export default Input;
diff --git a/src/components/index.ts b/src/components/index.ts
new file mode 100644
index 0000000..b219b9d
--- /dev/null
+++ b/src/components/index.ts
@@ -0,0 +1,9 @@
+export { default as Logo } from './Logo';
+export { default as Header } from './Header';
+export { default as Footer } from './Footer';
+
+export { default as LoginCard } from './LoginCard';
+export { default as LoginForm } from './LoginForm';
+
+// Common
+export { default as Input } from './common/Input';