feat: optiminize

This commit is contained in:
butterfly
2024-04-26 01:31:03 +08:00
parent 59583e53bd
commit 48e8c0a194
30 changed files with 304 additions and 263 deletions

View File

@@ -4,22 +4,22 @@ export interface CardProps {
className?: string;
children?: ReactNode;
title?: ReactNode;
inMobile?: boolean;
}
export default function Card(props: CardProps) {
const { className, children, title, inMobile } = props;
let titleClassName = "ml-4 mb-3";
if (inMobile) {
titleClassName = "ml-3 mb-3";
}
const { className, children, title } = props;
return (
<>
{title && (
<div
className={`capitalize font-black font-setting-card-title text-sm-mobile font-weight-setting-card-title ${titleClassName}`}
className={`
capitalize font-black font-setting-card-title text-sm-mobile font-weight-setting-card-title
mb-3
ml-3
md:ml-4
`}
>
{title}
</div>