import React from 'react' import { UnorderedListOutlined } from '@ant-design/icons' import styles from './QuestionFloatButton.module.less' interface QuestionFloatButtonProps { currentIndex: number totalQuestions: number onClick: () => void correctCount: number wrongCount: number } const QuestionFloatButton: React.FC = ({ currentIndex, totalQuestions, onClick, correctCount, wrongCount, }) => { if (totalQuestions === 0) return null const answeredCount = correctCount + wrongCount const progress = Math.round((answeredCount / totalQuestions) * 100) const radius = 28.5 const circumference = 2 * Math.PI * radius return (
{/* 统计信息卡片 */}
进度 {currentIndex + 1}/{totalQuestions}
正确 {correctCount}
错误 {wrongCount}
{/* 悬浮球 */}
{/* 进度环 */} {/* 中心图标 */}
) } export default QuestionFloatButton