forked from rajun/ar-test
28 lines
984 B
TypeScript
28 lines
984 B
TypeScript
import { AddButton } from '~/components/ui/add-button';
|
|
import { PageHeader } from '~/components/ui/page-header';
|
|
import { SegmentedControl } from '~/components/ui/segmented-control';
|
|
import { PROJECT_STATUS_OPTIONS } from '~/data/projects/constants';
|
|
import type { ProjectStatus } from '~/types/project';
|
|
|
|
interface ProjectsHeaderProps {
|
|
description: string;
|
|
status: ProjectStatus;
|
|
onStatusChange: (status: ProjectStatus) => void;
|
|
onCreate: () => void;
|
|
}
|
|
|
|
export function ProjectsHeader({ description, status, onStatusChange, onCreate }: ProjectsHeaderProps) {
|
|
return (
|
|
<PageHeader
|
|
title='Projects'
|
|
description={description}
|
|
actions={
|
|
<>
|
|
<SegmentedControl label='Project status' value={status} options={PROJECT_STATUS_OPTIONS} onChange={onStatusChange} />
|
|
<AddButton label='New project' onClick={onCreate} />
|
|
</>
|
|
}
|
|
/>
|
|
);
|
|
}
|