feat: add projects header

This commit is contained in:
rajun 2026-10-27 16:28:58 +05:30
parent dcdbfcd086
commit c8911e7e06

View File

@ -0,0 +1,27 @@
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} />
</>
}
/>
);
}