This commit is contained in:
2026-02-02 23:57:01 +08:00
parent 76749549ff
commit eaf97b8279
67 changed files with 106 additions and 134 deletions

View File

@@ -34,7 +34,7 @@ export interface ButtonProps {
href?: string;
}
export default function Button({
export function Button({
variant = "secondary",
size = "md",
selected = false,

View File

@@ -21,7 +21,7 @@ interface CardListProps {
className?: string;
}
export default function CardList({ children, className = "" }: CardListProps) {
export function CardList({ children, className = "" }: CardListProps) {
return (
<div className={`max-h-96 overflow-y-auto rounded-xl border border-gray-200 overflow-hidden ${className}`}>
{children}

View File

@@ -3,7 +3,7 @@ interface ContainerProps {
className?: string;
}
export default function Container({ children, className }: ContainerProps) {
export function Container({ children, className }: ContainerProps) {
return (
<div
className={`w-full max-w-2xl mx-auto bg-white border border-gray-200 rounded-2xl ${className}`}

View File

@@ -7,7 +7,7 @@ interface Props {
defaultValue?: string;
}
export default function Input({
export function Input({
ref,
placeholder = "",
type = "text",

View File

@@ -15,7 +15,7 @@ interface PageHeaderProps {
subtitle?: string;
}
export default function PageHeader({ title, subtitle }: PageHeaderProps) {
export function PageHeader({ title, subtitle }: PageHeaderProps) {
return (
<div className="mb-6">
<h1 className="text-2xl md:text-3xl font-bold text-gray-800 mb-2">

View File

@@ -20,7 +20,7 @@ interface PageLayoutProps {
className?: string;
}
export default function PageLayout({ children, className = "" }: PageLayoutProps) {
export function PageLayout({ children, className = "" }: PageLayoutProps) {
return (
<div className={`min-h-[calc(100vh-64px)] bg-[#35786f] flex items-center justify-center px-4 py-8 ${className}`}>
<div className="w-full max-w-2xl">

View File

@@ -1,7 +1,7 @@
// 向后兼容的按钮组件包装器
// 这些组件将新 Button 组件包装,以保持向后兼容
import Button from "../Button";
import { Button } from "../Button";
// LightButton: 次要按钮,支持 selected 状态
export const LightButton = (props: any) => <Button variant="secondary" {...props} />;