Common functions and utilities for tasks related to contributor count.
- Source:
Methods
(inner) contributorColor(contributorCount) → {string}
Determines the color used for a badge based on the contributor count. The color varies from red to bright green as the contributor count increases.
Parameters:
Name | Type | Description |
---|---|---|
contributorCount |
number | Contributor count |
- Source:
Returns:
Badge color
- Type
- string
(inner) renderContributorBadge(attrs) → {object}
Handles rendering concerns of badges that display contributor count. Determines the message and color of the badge according to the contributor count.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
attrs |
object | Refer to individual attributes Properties
|
- Source:
Returns:
Badge with label, message and color properties
- Type
- object