Skip to content

Commit 2d42689

Browse files
authored
Migrate Label to @primer/react-brand (#62081)
1 parent 7ed8824 commit 2d42689

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

src/graphql/components/GraphqlItem.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { type JSX } from 'react'
2-
import { Label } from '@primer/react'
2+
import { Label } from '@primer/react-brand'
33
import { HeadingLink } from '@/frame/components/article/HeadingLink'
44
import type { GraphqlT } from './types'
55
import { Notice } from './Notice'
@@ -41,9 +41,9 @@ export function GraphqlItem({ item, heading, children, headingLevel = 2, kind }:
4141
<HeadingLink as={headingTag(headingLevel)} slug={slug}>
4242
{item.name}
4343
</HeadingLink>
44-
<div className="d-flex flex-items-start" style={{ gap: '0.5rem' }}>
44+
<div className="d-flex flex-items-baseline" style={{ gap: '0.5rem' }}>
4545
{kindLabel && (
46-
<Label variant="secondary" style={{ flexShrink: 0, marginTop: '0.15rem' }}>
46+
<Label color="gray" size="small" style={{ flexShrink: 0 }}>
4747
{kindLabel}
4848
</Label>
4949
)}

src/landings/components/CookBookArticleCard.module.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
}
2222

2323
.labelGroup {
24+
display: flex;
2425
flex-wrap: wrap;
2526
gap: 0.25rem;
2627
}

src/landings/components/CookBookArticleCard.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { Label, LabelGroup, Link } from '@primer/react'
1+
import { Label } from '@primer/react-brand'
2+
import { Link } from '@primer/react'
23
import { ValidOcticon, getOcticonComponent } from '../lib/octicons'
34

45
import styles from './CookBookArticleCard.module.scss'
@@ -50,13 +51,13 @@ export const CookBookArticleCard = ({
5051
<Link href={url}>{title}</Link>
5152
</h3>
5253
<div className="fgColor-muted mb-3 mt-2">{description}</div>
53-
<LabelGroup className={styles.labelGroup}>
54+
<div className={styles.labelGroup}>
5455
{tags.map((tag, index) => (
55-
<Label key={index} variant="accent" className={styles.label} size="small">
56+
<Label key={index} color="blue" className={styles.label} size="small">
5657
{tag}
5758
</Label>
5859
))}
59-
</LabelGroup>
60+
</div>
6061
</div>
6162
</div>
6263
</div>

0 commit comments

Comments
 (0)