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
5 changes: 5 additions & 0 deletions .changeset/new-dragons-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

v38: Make sure Banner is exported from main and experimental
30 changes: 15 additions & 15 deletions e2e/components/Banner.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,68 +6,68 @@ import {viewports} from '../test-helpers/viewports'
const stories: Array<{title: string; id: string; viewports?: Array<keyof typeof viewports>}> = [
{
title: 'Default',
id: 'experimental-components-banner--default',
id: 'components-banner--default',
viewports: ['primer.breakpoint.xs', 'primer.breakpoint.sm'],
},
{
title: 'Critical',
id: 'experimental-components-banner-features--critical',
id: 'components-banner-features--critical',
},
{
title: 'Dismiss',
id: 'experimental-components-banner-features--dismiss',
id: 'components-banner-features--dismiss',
},
{
title: 'Dismiss With Actions',
id: 'experimental-components-banner-features--dismiss-with-actions',
id: 'components-banner-features--dismiss-with-actions',
},
{
title: 'Info',
id: 'experimental-components-banner-features--info',
id: 'components-banner-features--info',
},
{
title: 'Success',
id: 'experimental-components-banner-features--success',
id: 'components-banner-features--success',
},
{
title: 'Upsell',
id: 'experimental-components-banner-features--upsell',
id: 'components-banner-features--upsell',
},
{
title: 'Warning',
id: 'experimental-components-banner-features--warning',
id: 'components-banner-features--warning',
},
{
title: 'WithActions',
id: 'experimental-components-banner-features--with-actions',
id: 'components-banner-features--with-actions',
viewports: ['primer.breakpoint.xs', 'primer.breakpoint.sm'],
},
{
title: 'WithHiddenTitle',
id: 'experimental-components-banner-features--with-hidden-title',
id: 'components-banner-features--with-hidden-title',
},
{
title: 'WithHiddenTitleAndActions',
id: 'experimental-components-banner-features--with-hidden-title-and-actions',
id: 'components-banner-features--with-hidden-title-and-actions',
viewports: ['primer.breakpoint.xs', 'primer.breakpoint.sm'],
},
{
title: 'DismissibleWithHiddenTitleAndActions',
id: 'experimental-components-banner-features--dismissible-with-hidden-title-and-actions',
id: 'components-banner-features--dismissible-with-hidden-title-and-actions',
viewports: ['primer.breakpoint.xs', 'primer.breakpoint.sm'],
},
{
title: 'DismissibleWithHiddenTitleAndSecondaryAction',
id: 'experimental-components-banner-features--dismissible-with-hidden-title-and-secondary-action',
id: 'components-banner-features--dismissible-with-hidden-title-and-secondary-action',
viewports: ['primer.breakpoint.xs', 'primer.breakpoint.sm'],
},
{
title: 'InSidebar',
id: 'experimental-components-banner-examples--in-sidebar',
id: 'components-banner-examples--in-sidebar',
},
{
title: 'Multiline',
id: 'experimental-components-banner-examples--multiline',
id: 'components-banner-examples--multiline',
viewports: ['primer.breakpoint.xs', 'primer.breakpoint.sm'],
},
]
Expand Down
32 changes: 16 additions & 16 deletions packages/react/src/Banner/Banner.docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,52 @@
"name": "Banner",
"status": "alpha",
"a11yReviewed": "2025-01-08",
"importPath": "@primer/react/experimental",
"importPath": "@primer/react",
"stories": [
{
"id": "experimental-components-banner--default"
"id": "components-banner--default"
},
{
"id": "experimental-components-banner-features--critical"
"id": "components-banner-features--critical"
},
{
"id": "experimental-components-banner-features--info"
"id": "components-banner-features--info"
},
{
"id": "experimental-components-banner-features--success"
"id": "components-banner-features--success"
},
{
"id": "experimental-components-banner-features--upsell"
"id": "components-banner-features--upsell"
},
{
"id": "experimental-components-banner-features--warning"
"id": "components-banner-features--warning"
},
{
"id": "experimental-components-banner-features--dismiss"
"id": "components-banner-features--dismiss"
},
{
"id": "experimental-components-banner-features--dismiss-with-actions"
"id": "components-banner-features--dismiss-with-actions"
},
{
"id": "experimental-components-banner-features--with-hidden-title"
"id": "components-banner-features--with-hidden-title"
},
{
"id": "experimental-components-banner-features--with-hidden-title-and-actions"
"id": "components-banner-features--with-hidden-title-and-actions"
},
{
"id": "experimental-components-banner-features--dismissible-with-hidden-title-and-actions"
"id": "components-banner-features--dismissible-with-hidden-title-and-actions"
},
{
"id": "experimental-components-banner-features--dismissible-with-hidden-title-and-secondary-action"
"id": "components-banner-features--dismissible-with-hidden-title-and-secondary-action"
},
{
"id": "experimental-components-banner-features--with-actions"
"id": "components-banner-features--with-actions"
},
{
"id": "experimental-components-banner-features--custom-icon"
"id": "components-banner-features--custom-icon"
},
{
"id": "experimental-components-banner-examples--with-announcement"
"id": "components-banner-examples--with-announcement"
}
],
"props": [
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/Banner/Banner.examples.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {useFocus} from '../internal/hooks/useFocus'
import {PageLayout} from '../PageLayout'

const meta = {
title: 'Experimental/Components/Banner/Examples',
title: 'Components/Banner/Examples',
component: Banner,
} satisfies Meta<typeof Banner>

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/Banner/Banner.features.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {Banner} from '../Banner'
import Link from '../Link'

const meta = {
title: 'Experimental/Components/Banner/Features',
title: 'Components/Banner/Features',
component: Banner,
} satisfies Meta<typeof Banner>

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/Banner/Banner.figma.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Banner} from '../../src/experimental/'
import {Banner} from '../../src/'
import figma from '@figma/code-connect'

const componentProps = {
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/Banner/Banner.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {PageLayout} from '../PageLayout'
import {action} from 'storybook/actions'

const meta = {
title: 'Experimental/Components/Banner',
title: 'Components/Banner',
component: Banner,
} satisfies Meta<typeof Banner>

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/Button/Button.examples.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import type {Meta} from '@storybook/react-vite'
import {Button} from '.'
import {DownloadIcon} from '@primer/octicons-react'
import {Banner} from '../experimental'
import {Banner} from '../Banner'
import {AriaStatus, AriaAlert} from '../live-region'

const meta: Meta<typeof Button> = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ exports[`@primer/react > should not update exports without a semver change 1`] =
"type AvatarProps",
"AvatarStack",
"type AvatarStackProps",
"Banner",
"type BannerProps",
"BaseStyles",
"type BaseStylesProps",
"type BetterCssProperties",
Expand Down
2 changes: 2 additions & 0 deletions packages/react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ export {default as Avatar} from './Avatar'
export type {AvatarProps} from './Avatar'
export {default as AvatarStack} from './AvatarStack'
export type {AvatarStackProps} from './AvatarStack'
export {Banner} from './Banner'
export type {BannerProps} from './Banner'

export {default as BranchName} from './BranchName'
export type {BranchNameProps} from './BranchName'
Expand Down
Loading