Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/deprecate-issue-label-token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': minor
---

Deprecate `IssueLabelToken` in favor of `IssueLabel` from `@primer/react/experimental`.
10 changes: 10 additions & 0 deletions packages/react/src/Token/IssueLabelToken.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,23 @@ import type {ForwardRefComponent as PolymorphicForwardRefComponent} from '../uti
import classes from './IssueLabelToken.module.css'
import {clsx} from 'clsx'

/**
* @deprecated Use `IssueLabel` from `@primer/react/experimental` instead.
*/
export interface IssueLabelTokenProps extends TokenBaseProps {
/**
* The color that corresponds to the label
*/
fillColor?: string
}

/**
* @deprecated Use `IssueLabel` from `@primer/react/experimental` instead.
* `fillColor` carries over (as a `#hex` value). `IssueLabel` also accepts a `variant` for preset colors and
* renders a `span`, `a` (with `href`) or `button` (with `onClick`) based on the props provided.
* It has no `text`, `size`, `isSelected`, `onRemove` or `hideRemoveButton` props: pass the label text as `children`
* and render your own remove control if one is needed. `id` is forwarded to the root element, so convert numeric ids to strings.
*/
const IssueLabelToken = forwardRef((props, forwardedRef) => {
const {
as,
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/Token/Token.docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"subcomponents": [
{
"name": "IssueLabelToken",
"deprecated": true,
"props": [
{
"name": "fillColor",
Expand Down
Loading