优化代码,拆分组件
This commit is contained in:
16
src/components/cards/ACard.tsx
Normal file
16
src/components/cards/ACard.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
"use client";
|
||||
|
||||
interface ACardProps {
|
||||
children?: React.ReactNode;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export default function ACard({ children, className }: ACardProps) {
|
||||
return (
|
||||
<div
|
||||
className={`${className} w-[61vw] h-96 p-2 shadow-2xl bg-white rounded-xl`}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
12
src/components/cards/BCard.tsx
Normal file
12
src/components/cards/BCard.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
"use client";
|
||||
|
||||
interface BCardProps {
|
||||
children?: React.ReactNode;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export default function BCard({ children, className }: BCardProps) {
|
||||
return (
|
||||
<div className={`${className} rounded-xl p-2 shadow-xl`}>{children}</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user