You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added a new `InlineCode` component for short, in-situ code fragments.
6
+
7
+
Use it inside other components like `Card`, `CTABanner`, `River`, `Hero` and `Pillar`.
8
+
9
+
The native `code` elements remain supported in `Card`, `CTABanner` and `River` for backwards compatibility, but it's visual appearance has changed. It no longer features a border and has adjusted typographic spacing.
10
+
11
+
Example usage:
12
+
13
+
```js
14
+
import {InlineCode} from'@primer/react-brand'
15
+
```
16
+
17
+
```jsx
18
+
<InlineCode>git status</InlineCode>
19
+
```
20
+
21
+
Migration example for `Card`, `CTABanner` and `River`, which previously used `<code>`
22
+
23
+
```diff
24
+
+ import {Card, InlineCode} from '@primer/react-brand'
Copy file name to clipboardExpand all lines: packages/mcp/content/page-design.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,7 @@ A page has one clear headline and a calm step-down from there.
72
72
73
73
-**Do** — use the default `size` of component-owned text such as `Card.Heading`, `Hero.Heading`, and `FAQ.Heading`. Set `size` on standalone `Heading` and `Text`.
74
74
-**Do** — use a single hero heading, make secondary section headings a clear step smaller, and keep body copy regular weight. Left-align long-form copy; reserve centering for short hero or section intros.
75
+
-**Do** — use `InlineCode` for short code fragments and code blocks for multiline examples.
75
76
-**Don't** — pass `size` to a component-owned heading, description, label, or other text unless the brief requires an override. Changing `as` for semantic heading order does not require changing `size`.
76
77
-**Don't** — size secondary headings close to the hero, set body text in heavy weights, or center long paragraphs.
0 commit comments