import { useTutorialStore } from '@stores/tutorialStore' import { Check, Circle } from 'lucide-react' interface CheckpointProps { stepId: string title?: string description?: string } export function Checkpoint({ stepId, title = '完成此步骤', description = '确认你已经完成了上述操作' }: CheckpointProps) { const { completeStep, isStepCompleted } = useTutorialStore() const completed = isStepCompleted(stepId) const handleComplete = () => { if (!completed) { completeStep(stepId) } } return (
{completed ? '已完成' : title}
{completed ? '太棒了!继续下一步吧' : description}