import { Box, Switch, Typography } from '@mui/material'; interface AutoRefreshToggleProps { autoRefresh: boolean; onChange: (checked: boolean) => void; } export default function AutoRefreshToggle({ autoRefresh, onChange }: AutoRefreshToggleProps) { return ( 清理后自动刷新页面 onChange(e.target.checked)} color="warning" sx={{ '& .MuiSwitch-track': { borderRadius: 20, }, '& .MuiSwitch-thumb': { boxShadow: '0 2px 4px rgba(0, 0, 0, 0.2)', transition: 'all 0.2s', }, '&:hover .MuiSwitch-thumb': { transform: 'scale(1.1)', }, }} /> ); }