import React from 'react';
import { Button } from 'antd';
import { PlusOutlined } from '@ant-design/icons';

export const PageHeader = ({ title, onAdd, addButtonText = '新增' }) => (
  <div className="flex justify-between items-center mb-4">
    <h1 className="text-2xl font-bold">{title}</h1>
    {onAdd && (
      <Button type="primary" icon={<PlusOutlined />} onClick={onAdd}>
        {addButtonText}
      </Button>
    )}
  </div>
);