From cb21a384d63473295480a0905c4ca1ba59faf068 Mon Sep 17 00:00:00 2001 From: Josh Black Date: Thu, 10 Oct 2024 09:58:24 -0500 Subject: [PATCH] feat: add ButtonBase to experimental (#5099) * chore: exit prerelease mode * feat: add ButtonBase to experimental * chore: add changeset * Revert "chore: exit prerelease mode" This reverts commit 5418eb511f66715e2fcf5ca6cbc9fd640a6f8579. * test: update snapshots --------- Co-authored-by: Josh Black --- .changeset/real-seahorses-grab.md | 5 +++++ packages/react/src/Button/index.ts | 2 ++ .../react/src/__tests__/__snapshots__/exports.test.ts.snap | 4 ++++ packages/react/src/experimental/index.ts | 3 +++ 4 files changed, 14 insertions(+) create mode 100644 .changeset/real-seahorses-grab.md diff --git a/.changeset/real-seahorses-grab.md b/.changeset/real-seahorses-grab.md new file mode 100644 index 00000000000..7cc1bcb47ec --- /dev/null +++ b/.changeset/real-seahorses-grab.md @@ -0,0 +1,5 @@ +--- +'@primer/react': minor +--- + +Add ButtonBase to `@primer/react/experimental` to help with wildcard import interop diff --git a/packages/react/src/Button/index.ts b/packages/react/src/Button/index.ts index 35ed7077460..7545aa6e576 100644 --- a/packages/react/src/Button/index.ts +++ b/packages/react/src/Button/index.ts @@ -3,3 +3,5 @@ import {LinkButton} from './LinkButton' export type {ButtonProps, IconButtonProps} from './types' export {IconButton, LinkButton} export {ButtonComponent as Button} from './Button' +export {ButtonBase} from './ButtonBase' +export type {ButtonBaseProps} from './ButtonBase' diff --git a/packages/react/src/__tests__/__snapshots__/exports.test.ts.snap b/packages/react/src/__tests__/__snapshots__/exports.test.ts.snap index 3651ddc6fbe..376d5974445 100644 --- a/packages/react/src/__tests__/__snapshots__/exports.test.ts.snap +++ b/packages/react/src/__tests__/__snapshots__/exports.test.ts.snap @@ -45,6 +45,8 @@ exports[`@primer/react should not update exports without a semver change 1`] = ` "type BreadcrumbsItemProps", "type BreadcrumbsProps", "Button", + "ButtonBase", + "type ButtonBaseProps", "ButtonGroup", "type ButtonGroupProps", "type ButtonProps", @@ -259,6 +261,8 @@ exports[`@primer/react/experimental should not update exports without a semver c "type BannerProps", "Blankslate", "type BlankslateProps", + "ButtonBase", + "type ButtonBaseProps", "type ChildrenPropTypes", "type Column", "createColumnHelper", diff --git a/packages/react/src/experimental/index.ts b/packages/react/src/experimental/index.ts index 7cafc776d18..19ebadec41a 100644 --- a/packages/react/src/experimental/index.ts +++ b/packages/react/src/experimental/index.ts @@ -11,6 +11,9 @@ export {Blankslate} from '../Blankslate' export type {BlankslateProps} from '../Blankslate' +export {ButtonBase} from '../Button' +export type {ButtonBaseProps} from '../Button' + export {Banner} from '../Banner' export type {BannerProps} from '../Banner'