Skip to content

Commit

Permalink
fix(npm): update exports for UnderlinePanels (#4742)
Browse files Browse the repository at this point in the history
* fix(npm): update exports for UnderlinePanels

* chore: add changeset

* chore(lint): fix eslint warning

---------

Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
  • Loading branch information
joshblack and joshblack committed Jul 16, 2024
1 parent 9ad19a5 commit c004fd5
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .changeset/brave-shoes-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': patch
---

Update exports for UnderlinePanels component
12 changes: 6 additions & 6 deletions packages/react/src/__tests__/__snapshots__/exports.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ exports[`@primer/react/drafts should not update exports without a semver change
"default",
"default",
"default",
"default",
"Dialog",
"type DialogButtonProps",
"type DialogHeaderProps",
Expand Down Expand Up @@ -297,7 +296,6 @@ exports[`@primer/react/drafts should not update exports without a semver change
"type NavListTrailingVisualProps",
"PageHeader",
"type PageHeaderProps",
"type PanelProps",
"type ParentLinkProps",
"type Reference",
"type SavedReply",
Expand Down Expand Up @@ -331,15 +329,17 @@ exports[`@primer/react/drafts should not update exports without a semver change
"type TabPanelsPanelProps",
"type TabPanelsProps",
"type TabPanelsTabProps",
"type TabProps",
"type TitleProps",
"Tooltip",
"TooltipContext",
"type TooltipDirection",
"type TooltipProps",
"type Trigger",
"type TriggerPropsType",
"UnderlinePanels",
"type UnderlinePanelsPanelProps",
"type UnderlinePanelsProps",
"type UnderlinePanelsTabProps",
"useCombobox",
"useDynamicTextareaHeight",
"useIgnoreKeyboardActionsWhileComposing",
Expand Down Expand Up @@ -374,7 +374,6 @@ exports[`@primer/react/experimental should not update exports without a semver c
"default",
"default",
"default",
"default",
"Dialog",
"type DialogButtonProps",
"type DialogHeaderProps",
Expand Down Expand Up @@ -410,7 +409,6 @@ exports[`@primer/react/experimental should not update exports without a semver c
"type NavListTrailingVisualProps",
"PageHeader",
"type PageHeaderProps",
"type PanelProps",
"type ParentLinkProps",
"type Reference",
"type SavedReply",
Expand Down Expand Up @@ -444,15 +442,17 @@ exports[`@primer/react/experimental should not update exports without a semver c
"type TabPanelsPanelProps",
"type TabPanelsProps",
"type TabPanelsTabProps",
"type TabProps",
"type TitleProps",
"Tooltip",
"TooltipContext",
"type TooltipDirection",
"type TooltipProps",
"type Trigger",
"type TriggerPropsType",
"UnderlinePanels",
"type UnderlinePanelsPanelProps",
"type UnderlinePanelsProps",
"type UnderlinePanelsTabProps",
"useCombobox",
"useDynamicTextareaHeight",
"useIgnoreKeyboardActionsWhileComposing",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import React from 'react'
import {render, screen} from '@testing-library/react'
import UnderlinePanels from './UnderlinePanels'
import {behavesAsComponent, checkExports} from '../../utils/testing'
import {behavesAsComponent} from '../../utils/testing'
import TabContainerElement from '@github/tab-container-element'

TabContainerElement.prototype.selectTab = jest.fn()
Expand All @@ -24,10 +24,6 @@ describe('UnderlinePanels', () => {
jest.restoreAllMocks()
})

checkExports('drafts/UnderlinePanels', {
default: UnderlinePanels,
})

behavesAsComponent({Component: UnderlinePanels, options: {skipAs: true}})

behavesAsComponent({Component: UnderlinePanels.Tab})
Expand Down
10 changes: 8 additions & 2 deletions packages/react/src/drafts/UnderlinePanels/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
export {default} from './UnderlinePanels'
export type {UnderlinePanelsProps, TabProps, PanelProps} from './UnderlinePanels'
import UnderlinePanels from './UnderlinePanels'

export {UnderlinePanels}
export type {
UnderlinePanelsProps,
TabProps as UnderlinePanelsTabProps,
PanelProps as UnderlinePanelsPanelProps,
} from './UnderlinePanels'
3 changes: 2 additions & 1 deletion packages/react/src/drafts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export type {StackProps, StackItemProps} from '../Stack'
export {Announce, AriaStatus, AriaAlert} from '../live-region'
export type {AnnounceProps, AriaStatusProps, AriaAlertProps} from '../live-region'

export * from './UnderlinePanels'
export {UnderlinePanels} from './UnderlinePanels'
export type {UnderlinePanelsProps, UnderlinePanelsTabProps, UnderlinePanelsPanelProps} from './UnderlinePanels'

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

0 comments on commit c004fd5

Please sign in to comment.