Repository navigation
Expand file tree
/
Copy pathpullRequestListOptions.ts
More file actions
40 lines (36 loc) · 1.73 KB
/
Copy pathpullRequestListOptions.ts
File metadata and controls
40 lines (36 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import type { PullRequestInvolvement, PullRequestListState } from "@t3tools/contracts";
import {
CalendarArrowDownIcon,
CalendarArrowUpIcon,
ClockIcon,
EyeIcon,
LayersIcon,
ListChecksIcon,
Maximize2Icon,
Minimize2Icon,
PenLineIcon,
UserLockIcon,
} from "lucide-react";
import type { PullRequestFilterOption } from "./PullRequestListFilters";
import type { PullRequestListSort } from "./pullRequestListPreferences";
import { PullRequestGlyph } from "./pullRequestIcons";
export const INVOLVEMENT_TABS = [
{ value: "all", label: "All", Icon: LayersIcon },
{ value: "reviewing", label: "Reviewing", Icon: EyeIcon },
{ value: "authored", label: "Authored", Icon: PenLineIcon },
] as const satisfies ReadonlyArray<PullRequestFilterOption<PullRequestInvolvement>>;
export const STATE_TABS = [
{ value: "all", label: "All", Icon: LayersIcon },
{ value: "open", label: "Open", Icon: PullRequestGlyph.pullRequest },
{ value: "closed", label: "Closed", Icon: PullRequestGlyph.closed },
{ value: "merged", label: "Merged", Icon: PullRequestGlyph.merged },
] as const satisfies ReadonlyArray<PullRequestFilterOption<PullRequestListState>>;
export const SORT_OPTIONS = [
{ value: "ready", label: "Merge readiness", Icon: ListChecksIcon },
{ value: "blocked", label: "Blocked on me", Icon: UserLockIcon },
{ value: "updated", label: "Recently updated", Icon: ClockIcon },
{ value: "newest", label: "Newest shown", Icon: CalendarArrowDownIcon },
{ value: "oldest", label: "Oldest shown", Icon: CalendarArrowUpIcon },
{ value: "largest", label: "Largest shown", Icon: Maximize2Icon },
{ value: "smallest", label: "Smallest shown", Icon: Minimize2Icon },
] as const satisfies ReadonlyArray<PullRequestFilterOption<PullRequestListSort>>;