PriorityIcon
Displays a Tracker issue priority icon. Each priority level has a corresponding icon and color. Unknown priority values don't cause an error — the component displays the default icon (normal).
Usage
import {PriorityIcon} from '@weavix/tracker-components';
<PriorityIcon priority="blocker" />
<PriorityIcon priority="critical" />
<PriorityIcon priority="normal" />
Supported priorities
blocker · critical · important · normal · minor · minimal · trivial · arbitrary string (displays as normal)
From Tracker API
Requires the "tracker:issues:read" permission in the plugin's manifest.json:
{
"permissions": {
"data": ["tracker:issues:read"]
}
}
import {PriorityIcon} from '@weavix/tracker-components';
const priority = await trackerApi.v3.get['/issues/{id}/{field}']({
pathParams: {
id: 'ISSUEKEY-1',
field: 'priority',
},
});
<PriorityIcon
priority={priority.data.key}
title={priority.data.display}
/>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
priority |
string |
— | Issue priority key. Supported values are listed above |
size |
number |
16 |
Icon size in pixels |
title |
string |
— | Readable priority name for screen readers. If not provided, the icon is marked as decorative (aria-hidden) |
showBackground |
boolean |
false |
Show a round colored background behind the icon |
backgroundSize |
number |
— | Background circle size in pixels (only with showBackground) |
metaEntity |
boolean |
false |
Apply color variations for meta-entities |
className |
string |
— | Additional CSS class for the icon |
containerClassName |
string |
— | Additional CSS class for the outer container |
Was the article helpful?
Previous
Next