forked from rajun/ar-test
feat: add projects header
This commit is contained in:
parent
dcdbfcd086
commit
c8911e7e06
27
app/components/projects/list/projects-header.tsx
Normal file
27
app/components/projects/list/projects-header.tsx
Normal 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} />
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user