Skip to content

Commit c004fd5

Browse files
authored
fix(npm): update exports for UnderlinePanels (#4742)
* fix(npm): update exports for UnderlinePanels * chore: add changeset * chore(lint): fix eslint warning --------- Co-authored-by: Josh Black <[email protected]>
1 parent 9ad19a5 commit c004fd5

File tree

5 files changed

+22
-14
lines changed

5 files changed

+22
-14
lines changed

.changeset/brave-shoes-search.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/react': patch
3+
---
4+
5+
Update exports for UnderlinePanels component

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,6 @@ exports[`@primer/react/drafts should not update exports without a semver change
263263
"default",
264264
"default",
265265
"default",
266-
"default",
267266
"Dialog",
268267
"type DialogButtonProps",
269268
"type DialogHeaderProps",
@@ -297,7 +296,6 @@ exports[`@primer/react/drafts should not update exports without a semver change
297296
"type NavListTrailingVisualProps",
298297
"PageHeader",
299298
"type PageHeaderProps",
300-
"type PanelProps",
301299
"type ParentLinkProps",
302300
"type Reference",
303301
"type SavedReply",
@@ -331,15 +329,17 @@ exports[`@primer/react/drafts should not update exports without a semver change
331329
"type TabPanelsPanelProps",
332330
"type TabPanelsProps",
333331
"type TabPanelsTabProps",
334-
"type TabProps",
335332
"type TitleProps",
336333
"Tooltip",
337334
"TooltipContext",
338335
"type TooltipDirection",
339336
"type TooltipProps",
340337
"type Trigger",
341338
"type TriggerPropsType",
339+
"UnderlinePanels",
340+
"type UnderlinePanelsPanelProps",
342341
"type UnderlinePanelsProps",
342+
"type UnderlinePanelsTabProps",
343343
"useCombobox",
344344
"useDynamicTextareaHeight",
345345
"useIgnoreKeyboardActionsWhileComposing",
@@ -374,7 +374,6 @@ exports[`@primer/react/experimental should not update exports without a semver c
374374
"default",
375375
"default",
376376
"default",
377-
"default",
378377
"Dialog",
379378
"type DialogButtonProps",
380379
"type DialogHeaderProps",
@@ -410,7 +409,6 @@ exports[`@primer/react/experimental should not update exports without a semver c
410409
"type NavListTrailingVisualProps",
411410
"PageHeader",
412411
"type PageHeaderProps",
413-
"type PanelProps",
414412
"type ParentLinkProps",
415413
"type Reference",
416414
"type SavedReply",
@@ -444,15 +442,17 @@ exports[`@primer/react/experimental should not update exports without a semver c
444442
"type TabPanelsPanelProps",
445443
"type TabPanelsProps",
446444
"type TabPanelsTabProps",
447-
"type TabProps",
448445
"type TitleProps",
449446
"Tooltip",
450447
"TooltipContext",
451448
"type TooltipDirection",
452449
"type TooltipProps",
453450
"type Trigger",
454451
"type TriggerPropsType",
452+
"UnderlinePanels",
453+
"type UnderlinePanelsPanelProps",
455454
"type UnderlinePanelsProps",
455+
"type UnderlinePanelsTabProps",
456456
"useCombobox",
457457
"useDynamicTextareaHeight",
458458
"useIgnoreKeyboardActionsWhileComposing",

packages/react/src/drafts/UnderlinePanels/UnderlinePanels.test.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import React from 'react'
44
import {render, screen} from '@testing-library/react'
55
import UnderlinePanels from './UnderlinePanels'
6-
import {behavesAsComponent, checkExports} from '../../utils/testing'
6+
import {behavesAsComponent} from '../../utils/testing'
77
import TabContainerElement from '@github/tab-container-element'
88

99
TabContainerElement.prototype.selectTab = jest.fn()
@@ -24,10 +24,6 @@ describe('UnderlinePanels', () => {
2424
jest.restoreAllMocks()
2525
})
2626

27-
checkExports('drafts/UnderlinePanels', {
28-
default: UnderlinePanels,
29-
})
30-
3127
behavesAsComponent({Component: UnderlinePanels, options: {skipAs: true}})
3228

3329
behavesAsComponent({Component: UnderlinePanels.Tab})
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1-
export {default} from './UnderlinePanels'
2-
export type {UnderlinePanelsProps, TabProps, PanelProps} from './UnderlinePanels'
1+
import UnderlinePanels from './UnderlinePanels'
2+
3+
export {UnderlinePanels}
4+
export type {
5+
UnderlinePanelsProps,
6+
TabProps as UnderlinePanelsTabProps,
7+
PanelProps as UnderlinePanelsPanelProps,
8+
} from './UnderlinePanels'

packages/react/src/drafts/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export type {StackProps, StackItemProps} from '../Stack'
7878
export {Announce, AriaStatus, AriaAlert} from '../live-region'
7979
export type {AnnounceProps, AriaStatusProps, AriaAlertProps} from '../live-region'
8080

81-
export * from './UnderlinePanels'
81+
export {UnderlinePanels} from './UnderlinePanels'
82+
export type {UnderlinePanelsProps, UnderlinePanelsTabProps, UnderlinePanelsPanelProps} from './UnderlinePanels'
8283

8384
export {SkeletonBox, SkeletonText, SkeletonAvatar} from './Skeleton'

0 commit comments

Comments
 (0)