repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
Projectflow
stars
latest
clone command
git clone gitlawb://did:key:z6Mkfh4Y...QBEi/projectflowgit clone gitlawb://did:key:z6Mkfh4Y.../projectflowb3cded1async from playground1d ago| #1 | import clsx from "clsx"; |
| #2 | import { |
| #3 | ISSUE_TYPE_ICONS, |
| #4 | ISSUE_TYPE_COLORS, |
| #5 | } from "../../domain/value-objects"; |
| #6 | |
| #7 | export function StatusBadge({ status }: { status: string }) { |
| #8 | const map: Record<string, string> = { |
| #9 | backlog: "status-backlog", |
| #10 | todo: "status-todo", |
| #11 | "in-progress": "status-in-progress", |
| #12 | "in-review": "status-in-review", |
| #13 | done: "status-done", |
| #14 | cancelled: "status-cancelled", |
| #15 | }; |
| #16 | |
| #17 | const labelMap: Record<string, string> = { |
| #18 | backlog: "Backlog", |
| #19 | todo: "Todo", |
| #20 | "in-progress": "In Progress", |
| #21 | "in-review": "In Review", |
| #22 | done: "Done", |
| #23 | cancelled: "Cancelled", |
| #24 | }; |
| #25 | |
| #26 | return ( |
| #27 | <span className={clsx("badge", map[status] || "status-backlog")}> |
| #28 | {labelMap[status] || status} |
| #29 | </span> |
| #30 | ); |
| #31 | } |
| #32 | |
| #33 | export function PriorityBadge({ priority }: { priority: string }) { |
| #34 | const map: Record<string, string> = { |
| #35 | urgent: "priority-urgent", |
| #36 | high: "priority-high", |
| #37 | medium: "priority-medium", |
| #38 | low: "priority-low", |
| #39 | none: "priority-none", |
| #40 | }; |
| #41 | |
| #42 | return ( |
| #43 | <span className={clsx("badge capitalize", map[priority] || "priority-none")}> |
| #44 | {priority} |
| #45 | </span> |
| #46 | ); |
| #47 | } |
| #48 | |
| #49 | export function IssueTypeBadge({ type }: { type: string }) { |
| #50 | return ( |
| #51 | <span className={clsx("text-sm", ISSUE_TYPE_COLORS[type as keyof typeof ISSUE_TYPE_COLORS] || "text-zinc-400")}> |
| #52 | {ISSUE_TYPE_ICONS[type as keyof typeof ISSUE_TYPE_ICONS] || "○"} |
| #53 | </span> |
| #54 | ); |
| #55 | } |
| #56 |