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
| Prop | Type | Default | Description |
|---|---|---|---|
name* | string | - | Branch name |
isDefault | boolean | false | Whether 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" />