13 lines
374 B
TypeScript
13 lines
374 B
TypeScript
import { Button } from '@/ui/Button';
|
|
import styles from './UndoBar.module.css';
|
|
|
|
/** 删除后 5 秒内可撤销(ui-design §8) */
|
|
export function UndoBar({ onUndo }: { onUndo: () => void }) {
|
|
return (
|
|
<div className={styles.bar} role="status">
|
|
<span>已删除</span>
|
|
<Button variant="ghost" icon="undo" onClick={onUndo}>撤销</Button>
|
|
</div>
|
|
);
|
|
}
|