Skip to content

CommitList

Component for displaying a list of project commits.

Import

tsx
import { CommitList } from '@manningworks/projex'

Usage

tsx
<CommitList commits={project.commits} />

Props

PropTypeRequiredDescription
commitsProjectCommit[]YesArray of commit data to display

Returns null if the commits array is empty or undefined.

Data Attributes

AttributeDescription
data-projex-commit-listRoot commit list container
data-projex-commitIndividual commit item
data-projex-commit-messageCommit message
data-projex-commit-dateCommit date
data-projex-commit-linkLink to view commit
data-projex-commit-authorCommit author name

Styling

Messages over 100 characters are truncated with an ellipsis.

css
[data-projex-commit-message] {
  margin-bottom: 0.5rem;
}

[data-projex-commit-date] {
  font-size: 0.875rem;
  color: #6b7280;
}

[data-projex-commit-link] {
  font-size: 0.875rem;
  color: #3b82f6;
}