Skip to content

Commit 0466819

Browse files
authored
v38: Move Banner to main export (#6720)
1 parent d517b93 commit 0466819

File tree

11 files changed

+45
-41
lines changed

11 files changed

+45
-41
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/react": major
3+
---
4+
5+
v38: Move Banner to main export

e2e/components/Banner.test.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,68 +6,68 @@ import {viewports} from '../test-helpers/viewports'
66
const stories: Array<{title: string; id: string; viewports?: Array<keyof typeof viewports>}> = [
77
{
88
title: 'Default',
9-
id: 'experimental-components-banner--default',
9+
id: 'components-banner--default',
1010
viewports: ['primer.breakpoint.xs', 'primer.breakpoint.sm'],
1111
},
1212
{
1313
title: 'Critical',
14-
id: 'experimental-components-banner-features--critical',
14+
id: 'components-banner-features--critical',
1515
},
1616
{
1717
title: 'Dismiss',
18-
id: 'experimental-components-banner-features--dismiss',
18+
id: 'components-banner-features--dismiss',
1919
},
2020
{
2121
title: 'Dismiss With Actions',
22-
id: 'experimental-components-banner-features--dismiss-with-actions',
22+
id: 'components-banner-features--dismiss-with-actions',
2323
},
2424
{
2525
title: 'Info',
26-
id: 'experimental-components-banner-features--info',
26+
id: 'components-banner-features--info',
2727
},
2828
{
2929
title: 'Success',
30-
id: 'experimental-components-banner-features--success',
30+
id: 'components-banner-features--success',
3131
},
3232
{
3333
title: 'Upsell',
34-
id: 'experimental-components-banner-features--upsell',
34+
id: 'components-banner-features--upsell',
3535
},
3636
{
3737
title: 'Warning',
38-
id: 'experimental-components-banner-features--warning',
38+
id: 'components-banner-features--warning',
3939
},
4040
{
4141
title: 'WithActions',
42-
id: 'experimental-components-banner-features--with-actions',
42+
id: 'components-banner-features--with-actions',
4343
viewports: ['primer.breakpoint.xs', 'primer.breakpoint.sm'],
4444
},
4545
{
4646
title: 'WithHiddenTitle',
47-
id: 'experimental-components-banner-features--with-hidden-title',
47+
id: 'components-banner-features--with-hidden-title',
4848
},
4949
{
5050
title: 'WithHiddenTitleAndActions',
51-
id: 'experimental-components-banner-features--with-hidden-title-and-actions',
51+
id: 'components-banner-features--with-hidden-title-and-actions',
5252
viewports: ['primer.breakpoint.xs', 'primer.breakpoint.sm'],
5353
},
5454
{
5555
title: 'DismissibleWithHiddenTitleAndActions',
56-
id: 'experimental-components-banner-features--dismissible-with-hidden-title-and-actions',
56+
id: 'components-banner-features--dismissible-with-hidden-title-and-actions',
5757
viewports: ['primer.breakpoint.xs', 'primer.breakpoint.sm'],
5858
},
5959
{
6060
title: 'DismissibleWithHiddenTitleAndSecondaryAction',
61-
id: 'experimental-components-banner-features--dismissible-with-hidden-title-and-secondary-action',
61+
id: 'components-banner-features--dismissible-with-hidden-title-and-secondary-action',
6262
viewports: ['primer.breakpoint.xs', 'primer.breakpoint.sm'],
6363
},
6464
{
6565
title: 'InSidebar',
66-
id: 'experimental-components-banner-examples--in-sidebar',
66+
id: 'components-banner-examples--in-sidebar',
6767
},
6868
{
6969
title: 'Multiline',
70-
id: 'experimental-components-banner-examples--multiline',
70+
id: 'components-banner-examples--multiline',
7171
viewports: ['primer.breakpoint.xs', 'primer.breakpoint.sm'],
7272
},
7373
]

packages/react/src/Banner/Banner.docs.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,52 +3,52 @@
33
"name": "Banner",
44
"status": "alpha",
55
"a11yReviewed": "2025-01-08",
6-
"importPath": "@primer/react/experimental",
6+
"importPath": "@primer/react",
77
"stories": [
88
{
9-
"id": "experimental-components-banner--default"
9+
"id": "components-banner--default"
1010
},
1111
{
12-
"id": "experimental-components-banner-features--critical"
12+
"id": "components-banner-features--critical"
1313
},
1414
{
15-
"id": "experimental-components-banner-features--info"
15+
"id": "components-banner-features--info"
1616
},
1717
{
18-
"id": "experimental-components-banner-features--success"
18+
"id": "components-banner-features--success"
1919
},
2020
{
21-
"id": "experimental-components-banner-features--upsell"
21+
"id": "components-banner-features--upsell"
2222
},
2323
{
24-
"id": "experimental-components-banner-features--warning"
24+
"id": "components-banner-features--warning"
2525
},
2626
{
27-
"id": "experimental-components-banner-features--dismiss"
27+
"id": "components-banner-features--dismiss"
2828
},
2929
{
30-
"id": "experimental-components-banner-features--dismiss-with-actions"
30+
"id": "components-banner-features--dismiss-with-actions"
3131
},
3232
{
33-
"id": "experimental-components-banner-features--with-hidden-title"
33+
"id": "components-banner-features--with-hidden-title"
3434
},
3535
{
36-
"id": "experimental-components-banner-features--with-hidden-title-and-actions"
36+
"id": "components-banner-features--with-hidden-title-and-actions"
3737
},
3838
{
39-
"id": "experimental-components-banner-features--dismissible-with-hidden-title-and-actions"
39+
"id": "components-banner-features--dismissible-with-hidden-title-and-actions"
4040
},
4141
{
42-
"id": "experimental-components-banner-features--dismissible-with-hidden-title-and-secondary-action"
42+
"id": "components-banner-features--dismissible-with-hidden-title-and-secondary-action"
4343
},
4444
{
45-
"id": "experimental-components-banner-features--with-actions"
45+
"id": "components-banner-features--with-actions"
4646
},
4747
{
48-
"id": "experimental-components-banner-features--custom-icon"
48+
"id": "components-banner-features--custom-icon"
4949
},
5050
{
51-
"id": "experimental-components-banner-examples--with-announcement"
51+
"id": "components-banner-examples--with-announcement"
5252
}
5353
],
5454
"props": [

packages/react/src/Banner/Banner.examples.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {useFocus} from '../internal/hooks/useFocus'
1212
import {PageLayout} from '../PageLayout'
1313

1414
const meta = {
15-
title: 'Experimental/Components/Banner/Examples',
15+
title: 'Components/Banner/Examples',
1616
component: Banner,
1717
} satisfies Meta<typeof Banner>
1818

packages/react/src/Banner/Banner.features.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {Banner} from '../Banner'
55
import Link from '../Link'
66

77
const meta = {
8-
title: 'Experimental/Components/Banner/Features',
8+
title: 'Components/Banner/Features',
99
component: Banner,
1010
} satisfies Meta<typeof Banner>
1111

packages/react/src/Banner/Banner.figma.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Banner} from '../../src/experimental/'
1+
import {Banner} from '../../src/'
22
import figma from '@figma/code-connect'
33

44
const componentProps = {

packages/react/src/Banner/Banner.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {PageLayout} from '../PageLayout'
55
import {action} from 'storybook/actions'
66

77
const meta = {
8-
title: 'Experimental/Components/Banner',
8+
title: 'Components/Banner',
99
component: Banner,
1010
} satisfies Meta<typeof Banner>
1111

packages/react/src/Button/Button.examples.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react'
22
import type {Meta} from '@storybook/react-vite'
33
import {Button} from '.'
44
import {DownloadIcon} from '@primer/octicons-react'
5-
import {Banner} from '../experimental'
5+
import {Banner} from '../Banner'
66
import {AriaStatus, AriaAlert} from '../live-region'
77

88
const meta: Meta<typeof Button> = {

packages/react/src/__tests__/__snapshots__/exports.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ exports[`@primer/react > should not update exports without a semver change 1`] =
2727
"type AvatarProps",
2828
"AvatarStack",
2929
"type AvatarStackProps",
30+
"Banner",
31+
"type BannerProps",
3032
"BaseStyles",
3133
"type BaseStylesProps",
3234
"type BetterCssProperties",
@@ -255,8 +257,6 @@ exports[`@primer/react/experimental > should not update exports without a semver
255257
"type AriaAlertProps",
256258
"AriaStatus",
257259
"type AriaStatusProps",
258-
"Banner",
259-
"type BannerProps",
260260
"Blankslate",
261261
"type BlankslateProps",
262262
"ButtonBase",

packages/react/src/experimental/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ export type {BlankslateProps} from '../Blankslate'
1414
export {ButtonBase} from '../Button'
1515
export type {ButtonBaseProps} from '../Button'
1616

17-
export {Banner} from '../Banner'
18-
export type {BannerProps} from '../Banner'
19-
2017
export {DataTable, Table, createColumnHelper} from '../DataTable'
2118
export type {
2219
DataTableProps,

0 commit comments

Comments
 (0)