BranchBadge

Displays a git branch name as a styled badge, with special styling for the default branch.

Import

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

Props

PropTypeDefaultDescription
name*string-Branch name
isDefaultbooleanfalseWhether this is the default branch (styled with primary color)

Examples

Default Branch

The default branch is highlighted with the primary color.

main
<BranchBadge name="main" isDefault />

Feature Branches

Non-default branches use neutral styling.

feature/authfix/header-layoutchore/deps
<BranchBadge name="feature/auth" />
<BranchBadge name="fix/header-layout" />
<BranchBadge name="chore/deps" />