IssueRow

Displays an issue with number, title, state badge, labels, author, date, and comment count.

Import

import { IssueRow } from "@gumtree/ui/forge/IssueRow";

Props

PropTypeDefaultDescription
number*number-Issue number
title*string-Issue title
state*"open" | "closed"-Issue state (affects badge color)
labelsArray<{ name: string }>-Labels to display
author*string-Author username
date*string-Date string
commentCountnumber-Number of comments
hrefstring-Link to the issue page

Examples

Open Issue

An open issue with labels and comments.

open
Add dark mode support
enhancementui
#42 opened 3 days ago by alice
5 comments
<IssueRow
  number={42}
  title="Add dark mode support"
  state="open"
  labels={[{ name: "enhancement" }, { name: "ui" }]}
  author="alice"
  date="3 days ago"
  commentCount={5}
/>

Closed Issue

A closed issue with an error-colored badge.

closed
Fix broken pagination on repo list
bug
#41 opened 1 week ago by bob
2 comments
<IssueRow
  number={41}
  title="Fix broken pagination on repo list"
  state="closed"
  labels={[{ name: "bug" }]}
  author="bob"
  date="1 week ago"
  commentCount={2}
/>