24 lines
582 B
TypeScript
24 lines
582 B
TypeScript
import React from 'react';
|
|
import { Link } from '@remix-run/react';
|
|
|
|
interface PageHeaderProps {
|
|
title: string;
|
|
onSave?: () => void;
|
|
}
|
|
|
|
export function PageHeader({ title, onSave }: PageHeaderProps) {
|
|
return (
|
|
<div className="flex justify-between items-center">
|
|
<h1 className="text-xl font-medium text-gray-800">{title}</h1>
|
|
<div>
|
|
<button
|
|
type="button"
|
|
className="ant-btn ant-btn-primary"
|
|
onClick={onSave}
|
|
>
|
|
<i className="ri-save-line mr-1"></i> 保存
|
|
</button>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|