大改变

This commit is contained in:
YoRHa
2026-02-03 19:56:21 +08:00
parent 4b13d255bc
commit 9aa9e44295
545 changed files with 8712 additions and 16168 deletions

View File

@@ -0,0 +1,63 @@
"use client";
import { Button, ButtonProps } from "@heroui/react";
import { tv } from "tailwind-variants";
const borderedButtonStyles = tv({
slots: {
base: "rounded-xl border border-[#E5E7EB] dark:border-gray-600 flex items-center justify-center",
button: "w-full h-full rounded-xl px-6 text-body-small font-bold border-none",
},
variants: {
size: {
md: {
base: "h-10",
},
lg: {
base: "h-11",
},
},
fullWidth: {
true: {
base: "w-full",
},
},
isTheme: {
true: {
button: "bg-white dark:bg-gray-800 text-text-primary dark:text-white",
},
},
},
defaultVariants: {
size: "md",
isTheme: false,
},
});
interface BorderedButtonProps extends ButtonProps {
size?: "md" | "lg";
fullWidth?: boolean;
isTheme?: boolean;
}
export default function BorderedButton({
size = "md",
fullWidth = false,
isTheme = false,
className,
...props
}: BorderedButtonProps) {
const { base, button } = borderedButtonStyles({ size, fullWidth, isTheme });
return (
<div className={base({ className })}>
<Button
className={button()}
{...props}
>
{props.children}
</Button>
</div>
);
}