"use client" /** * 布局组件模板 * * 包含项目中常用的各种布局组件 */ import type React from "react" import { Button } from "@/components/ui/button" import { ChevronLeft } from "lucide-react" interface PageHeaderProps { title: string onBack?: () => void actionButton?: React.ReactNode } /** * 页面头部组件 * 用于页面顶部的标题和操作区 */ export function PageHeader({ title, onBack, actionButton }: PageHeaderProps) { return (
{onBack && ( )}

{title}

{actionButton}
) } interface StepIndicatorProps { steps: Array<{ step: number title: string icon: React.ReactNode }> currentStep: number } /** * 步骤指示器组件 * 用于多步骤流程的导航 */ export function StepIndicator({ steps, currentStep }: StepIndicatorProps) { return (
{steps.map(({ step, title, icon }) => (
{step < currentStep ? "✓" : icon}
{title}
))}
) } interface StepNavigationProps { onBack: () => void onNext: () => void nextLabel?: string backLabel?: string isLastStep?: boolean isNextDisabled?: boolean } /** * 步骤导航组件 * 用于多步骤流程的前进后退按钮 */ export function StepNavigation({ onBack, onNext, nextLabel = "下一步", backLabel = "上一步", isLastStep = false, isNextDisabled = false, }: StepNavigationProps) { return (
) }