Skip to content
Merged
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
17 changes: 14 additions & 3 deletions apps/next-docs/content/components/AnchorNav/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Please refer to our [Storybook examples](https://primer.style/brand/storybook/?p
### Basic

```jsx live
<div style={{position: 'relative', overflowX: 'scroll', width: '100%'}}>
<div style={{position: 'relative', overflowX: 'scroll', width: '100%', contain: 'layout'}}>
<AnchorNav>
<AnchorNav.Link href="#basic-section1">Section one</AnchorNav.Link>
<AnchorNav.Link href="#basic-section2">Section two</AnchorNav.Link>
Expand All @@ -45,6 +45,7 @@ Please refer to our [Storybook examples](https://primer.style/brand/storybook/?p
style={{
padding: '100px 2rem',
backgroundColor: 'var(--base-color-scale-lemon-0)',
color: 'var(--base-color-scale-black-0)',
}}
>
Section 1
Expand All @@ -54,6 +55,7 @@ Please refer to our [Storybook examples](https://primer.style/brand/storybook/?p
style={{
padding: '100px 2rem',
backgroundColor: 'var(--base-color-scale-yellow-0)',
color: 'var(--base-color-scale-black-0)',
}}
>
Section 2
Expand All @@ -63,6 +65,7 @@ Please refer to our [Storybook examples](https://primer.style/brand/storybook/?p
style={{
padding: '100px 2rem',
backgroundColor: 'var(--base-color-scale-lime-0)',
color: 'var(--base-color-scale-black-0)',
}}
>
Section 3
Expand All @@ -72,6 +75,7 @@ Please refer to our [Storybook examples](https://primer.style/brand/storybook/?p
style={{
padding: '100px 2rem',
backgroundColor: 'var(--base-color-scale-green-0)',
color: 'var(--base-color-scale-black-0)',
}}
>
Section 4
Expand All @@ -81,6 +85,7 @@ Please refer to our [Storybook examples](https://primer.style/brand/storybook/?p
style={{
padding: '100px 2rem',
backgroundColor: 'var(--base-color-scale-teal-0)',
color: 'var(--base-color-scale-black-0)',
}}
>
Section 5
Expand All @@ -93,7 +98,7 @@ Please refer to our [Storybook examples](https://primer.style/brand/storybook/?p
`AnchorNav` can also feature secondary actions. When two actions are present, the first will be presented as the `primary` variant.

```jsx live
<div style={{position: 'relative', overflowX: 'scroll', width: '100%'}}>
<div style={{position: 'relative', overflowX: 'scroll', width: '100%', contain: 'layout'}}>
<AnchorNav>
<AnchorNav.Link href="#fewer-links-section1">Section one</AnchorNav.Link>
<AnchorNav.Link href="#fewer-links-section2">Section two</AnchorNav.Link>
Expand All @@ -106,6 +111,7 @@ Please refer to our [Storybook examples](https://primer.style/brand/storybook/?p
style={{
padding: '100px 2rem',
backgroundColor: 'var(--base-color-scale-lemon-0)',
color: 'var(--base-color-scale-black-0)',
}}
>
Section 1
Expand All @@ -115,6 +121,7 @@ Please refer to our [Storybook examples](https://primer.style/brand/storybook/?p
style={{
padding: '100px 2rem',
backgroundColor: 'var(--base-color-scale-yellow-0)',
color: 'var(--base-color-scale-black-0)',
}}
>
Section 2
Expand All @@ -124,6 +131,7 @@ Please refer to our [Storybook examples](https://primer.style/brand/storybook/?p
style={{
padding: '100px 2rem',
backgroundColor: 'var(--base-color-scale-lime-0)',
color: 'var(--base-color-scale-black-0)',
}}
>
Section 3
Expand All @@ -136,7 +144,7 @@ Please refer to our [Storybook examples](https://primer.style/brand/storybook/?p
`AnchorNav` implementations with fewer than `5` links, will automatically align links to the `start`.

```jsx live
<div style={{position: 'relative', overflowX: 'scroll', width: '100%'}}>
<div style={{position: 'relative', overflowX: 'scroll', width: '100%', contain: 'layout'}}>
<AnchorNav>
<AnchorNav.Link href="#fewer-links-section1">Section one</AnchorNav.Link>
<AnchorNav.Link href="#fewer-links-section2">Section two</AnchorNav.Link>
Expand All @@ -148,6 +156,7 @@ Please refer to our [Storybook examples](https://primer.style/brand/storybook/?p
style={{
padding: '100px 2rem',
backgroundColor: 'var(--base-color-scale-lemon-0)',
color: 'var(--base-color-scale-black-0)',
}}
>
Section 1
Expand All @@ -157,6 +166,7 @@ Please refer to our [Storybook examples](https://primer.style/brand/storybook/?p
style={{
padding: '100px 2rem',
backgroundColor: 'var(--base-color-scale-yellow-0)',
color: 'var(--base-color-scale-black-0)',
}}
>
Section 2
Expand All @@ -166,6 +176,7 @@ Please refer to our [Storybook examples](https://primer.style/brand/storybook/?p
style={{
padding: '100px 2rem',
backgroundColor: 'var(--base-color-scale-lime-0)',
color: 'var(--base-color-scale-black-0)',
}}
>
Section 3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ The content alignment can be changed using the `align` prop on the root `Breakou
### Optional background color

```jsx live
<BreakoutBanner backgroundColor="var(--base-color-scale-blue-0)">
<BreakoutBanner backgroundColor="var(--brand-color-success-subtle)">
<BreakoutBanner.Heading>Where the most ambitious teams build great things</BreakoutBanner.Heading>
<BreakoutBanner.Description>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sapien sit ullamcorper id. Aliquam luctus sed turpis
Expand Down
92 changes: 51 additions & 41 deletions apps/next-docs/content/components/MinimalFooter/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,51 +22,57 @@ import {MinimalFooter} from '@primer/react-brand'
### Default

```jsx live
<MinimalFooter />
<div style={{width: '100%'}}>
<MinimalFooter />
</div>
```

### Footer links

Use up to five `MinimalFooter.Link` children. Links can render as anchors or buttons.

```jsx live
<MinimalFooter>
<MinimalFooter.Link href="https://github.com/organizations/enterprise_plan">Try GitHub for free</MinimalFooter.Link>
<MinimalFooter.Link href="https://github.com/enterprise">Enterprise</MinimalFooter.Link>
<MinimalFooter.Link href="https://github.com/enterprise/contact">Email us</MinimalFooter.Link>
</MinimalFooter>
<div style={{width: '100%'}}>
<MinimalFooter>
<MinimalFooter.Link href="https://github.com/organizations/enterprise_plan">Try GitHub for free</MinimalFooter.Link>
<MinimalFooter.Link href="https://github.com/enterprise">Enterprise</MinimalFooter.Link>
<MinimalFooter.Link href="https://github.com/enterprise/contact">Email us</MinimalFooter.Link>
</MinimalFooter>
</div>
```

### Footnotes

```jsx live
<MinimalFooter>
<MinimalFooter.Footnotes>
<Text>
<sup>1</sup>By signing up, GitHub may use your information to personalize and measure the effectiveness of
enterprise business ads, including those you see off of GitHub, promotional communications or marketing you
receive related to the Enterprise Marketing Pages. We will send you relevant emails and promotional information
based on your GitHub profile and any additional information provided in the sign-up form. If you change your mind,
you can unsubscribe at any time (an unsubscribe link is provided in every email). For more information on how
GitHub uses your personal information, please see the{' '}
<InlineLink
href="https://docs.github.com/en/site-policy/privacy-policies/github-privacy-statement"
target="_blank"
>
GitHub Privacy Statement
</InlineLink>
.
</Text>
</MinimalFooter.Footnotes>
</MinimalFooter>
<div style={{width: '100%'}}>
<MinimalFooter>
<MinimalFooter.Footnotes>
<Text>
<sup>1</sup>By signing up, GitHub may use your information to personalize and measure the effectiveness of
enterprise business ads, including those you see off of GitHub, promotional communications or marketing you
receive related to the Enterprise Marketing Pages. We will send you relevant emails and promotional information
based on your GitHub profile and any additional information provided in the sign-up form. If you change your
mind, you can unsubscribe at any time (an unsubscribe link is provided in every email). For more information on
how GitHub uses your personal information, please see the{' '}
<InlineLink
href="https://docs.github.com/en/site-policy/privacy-policies/github-privacy-statement"
target="_blank"
>
GitHub Privacy Statement
</InlineLink>
.
</Text>
</MinimalFooter.Footnotes>
</MinimalFooter>
</div>
```

### Footer social links

`MinimalFooter` will render all supported social links by default. Social links can be removed however, by passing `socialLinks={false}`. Alternatively, pass an array of valid social links to filter and reorder the default list.

```jsx live
<Stack>
<Stack style={{width: '100%'}}>
Hide all social links:
<MinimalFooter socialLinks={false} />
<br />
Expand All @@ -80,18 +86,20 @@ Use up to five `MinimalFooter.Link` children. Links can render as anchors or but
Use `centerComponent` for an exceptional page-specific control or status indicator between the top and bottom sections.

```jsx live
<MinimalFooter
centerComponent={
<Stack direction="horizontal" gap="condensed" padding="none">
<Text size="200" variant="muted">
Status:
</Text>
<InlineLink href="https://www.githubstatus.com" size="200">
All systems operational
</InlineLink>
</Stack>
}
/>
<div style={{width: '100%'}}>
<MinimalFooter
centerComponent={
<Stack direction="horizontal" gap="condensed" padding="none">
<Text size="200" variant="muted">
Status:
</Text>
<InlineLink href="https://www.githubstatus.com" size="200">
All systems operational
</InlineLink>
</Stack>
}
/>
</div>
```

### Back to top
Expand All @@ -101,9 +109,11 @@ Use `MinimalFooter.BackToTop` to opt into a control in the top row that scrolls
After keyboard activation, focus moves to the first `<main>` element, falling back to `<body>` or `<html>` when a main landmark is unavailable. Use `focusTargetId` to identify a different semantic top-of-page destination.

```jsx live
<MinimalFooter socialLinks={false}>
<MinimalFooter.BackToTop>Back to top</MinimalFooter.BackToTop>
</MinimalFooter>
<div style={{width: '100%'}}>
<MinimalFooter socialLinks={false}>
<MinimalFooter.BackToTop>Back to top</MinimalFooter.BackToTop>
</MinimalFooter>
</div>
```

## Component props
Expand Down
20 changes: 11 additions & 9 deletions apps/next-docs/content/components/PricingOptions/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -412,15 +412,17 @@ automatically generated label:
```jsx
function FeatureWithCustomContent({customContent}) {
return (
<PricingOptions.FeatureListItem
infoTooltip="Interact with Copilot using natural language."
infoTooltipAriaLabel="More information about Chat in IDE and Mobile"
>
<>
Chat in IDE and Mobile
{customContent ? <Text>Custom footnote</Text> : null}
</>
</PricingOptions.FeatureListItem>
<PricingOptions.FeatureList>
<PricingOptions.FeatureListItem
infoTooltip="Interact with Copilot using natural language."
infoTooltipAriaLabel="More information about Chat in IDE and Mobile"
>
<>
Chat in IDE and Mobile
{customContent ? <Text>Custom footnote</Text> : null}
</>
</PricingOptions.FeatureListItem>
</PricingOptions.FeatureList>
)
}
```
Expand Down
2 changes: 1 addition & 1 deletion apps/next-docs/content/components/Prose/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ The `Prose` component renders native HTML elements with Primer Brand styling. `P
<h4>Heading level 4</h4>
<p>
Secure code as you write it. Automatically review every change to your codebase and identify vulnerabilities
before they reach production. <a href="/#">Learn more here.</a>
before they reach production. <a href="https://github.com/security/advanced-security/code-security">Learn more about GitHub Code Security.</a>
</p>
<h5>Heading level 5</h5>
<ol>
Expand Down
11 changes: 4 additions & 7 deletions apps/next-docs/content/components/River/react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
} from './react'

```js
import {River, RiverBreakout} from '@primer/react-brand'
import {MinimalVideoPlayer, River, RiverBreakout} from '@primer/react-brand'
```

## Examples
Expand Down Expand Up @@ -161,11 +161,8 @@ The `gridline` variant adds lateral padding and applies a full-bleed visual back
```jsx live
<River style={{width: '100%'}} imageTextRatio="60:40">
<River.Visual hasShadow={false}>
<video
loop
playsInline
autoPlay
muted
<MinimalVideoPlayer
title="Break issues into actionable tasks"
poster="https://github.githubassets.com/images/modules/site/issues/issue-tasks-progress-placeholder.png"
>
<source
Expand All @@ -176,7 +173,7 @@ The `gridline` variant adds lateral padding and applies a full-bleed visual back
type="video/mp4; codecs=avc1.4D401E,mp4a.40.2"
src="https://github.githubassets.com/images/modules/site/issues/issue-tasks-progress.h264.mp4"
/>
</video>
</MinimalVideoPlayer>
</River.Visual>
<River.Content>
<Heading>Break issues into actionable tasks</Heading>
Expand Down
2 changes: 1 addition & 1 deletion apps/next-docs/content/components/Tabs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function CustomPanels() {
}, [])

return (
<Stack alignItems="center">
<Stack alignItems="center" style={{width: '100%'}}>
<Tabs onChange={handleTabChange} aria-label="Lifecycle tabs">
<Tabs.Item id="tab-1" aria-controls="panel-1">
Code
Expand Down
4 changes: 2 additions & 2 deletions apps/next-docs/content/components/Testimonial/react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import {Testimonial} from '@primer/react-brand'
For an alternative visual appearance and layout, without altering semantic meaning.

```jsx live
<Stack direction="horizontal" gap="spacious" padding="none">
<Stack direction={{narrow: 'vertical', regular: 'horizontal'}} gap="spacious" padding="none">
<Testimonial variant="default">
<Testimonial.Quote>
GitHub helps us ensure that we have our security controls baked into our pipelines all the way from the first line
Expand Down Expand Up @@ -100,7 +100,7 @@ Use `size` to alternate the text size. Available options are `small` (default) a
Use `Stack` to help position multiple, adjacent Testimonials alongside one another.

```jsx live
<Stack direction="horizontal" gap="spacious" padding="spacious">
<Stack direction={{narrow: 'vertical', regular: 'horizontal'}} gap="spacious" padding="spacious">
<Testimonial>
<Testimonial.Quote>
GitHub helps us ensure that we have our security controls baked into our pipelines all the way from the first line
Expand Down
Loading