UsersToolbar.tsx 562 Bytes
import { Button, Space } from 'antd';

interface Props {
  onRefresh: () => void;
  onAdd: () => void;
}

export default function UsersToolbar({ onRefresh, onAdd }: Props) {
  return (
    <Space data-testid="users-toolbar" style={{ marginBottom: 12 }}>
      <Button data-testid="toolbar-refresh" onClick={onRefresh}>
        刷新
      </Button>
      <Button type="primary" data-testid="toolbar-add" onClick={onAdd}>
        新增
      </Button>
      <Button disabled data-testid="toolbar-export">
        导出Excel
      </Button>
    </Space>
  );
}