diff --git a/.changeset/nice-cycles-dress.md b/.changeset/nice-cycles-dress.md new file mode 100644 index 00000000000..07bf00dfdb1 --- /dev/null +++ b/.changeset/nice-cycles-dress.md @@ -0,0 +1,5 @@ +--- +"@primer/styled-react": patch +--- + +Export ThemeProviderProps and BaseStylesProps diff --git a/packages/styled-react/src/components/FeatureFlaggedTheming.tsx b/packages/styled-react/src/components/FeatureFlaggedTheming.tsx index 16751b47d03..93a9896cf1e 100644 --- a/packages/styled-react/src/components/FeatureFlaggedTheming.tsx +++ b/packages/styled-react/src/components/FeatureFlaggedTheming.tsx @@ -1,8 +1,6 @@ import { ThemeProvider as PrimerReactThemeProvider, - type ThemeProviderProps, BaseStyles as PrimerReactBaseStyles, - type BaseStylesProps, useTheme as primerReactUseTheme, useColorSchemeVar as primerReactUseColorSchemeVar, } from '@primer/react' @@ -10,8 +8,9 @@ import { ThemeProvider as StyledReactThemeProvider, useTheme as styledReactUseTheme, useColorSchemeVar as styledReactUseColorSchemeVar, + type ThemeProviderProps, } from './ThemeProvider' -import {BaseStyles as StyledReactBaseStyles} from './BaseStyles' +import {BaseStyles as StyledReactBaseStyles, type BaseStylesProps} from './BaseStyles' import {useFeatureFlag} from '@primer/react/experimental' export const ThemeProvider: React.FC> = ({children, ...props}) => { @@ -47,3 +46,5 @@ export const useColorSchemeVar: typeof primerReactUseColorSchemeVar = (values, f return enabled ? styledReactResults : primerReactResults } + +export type {ThemeProviderProps, BaseStylesProps} diff --git a/packages/styled-react/src/index.tsx b/packages/styled-react/src/index.tsx index b06dae7feaa..38dc1c42e55 100644 --- a/packages/styled-react/src/index.tsx +++ b/packages/styled-react/src/index.tsx @@ -5,7 +5,14 @@ export {Details} from '@primer/react' export {ProgressBar} from '@primer/react' // theming depends on styled-components -export {ThemeProvider, useTheme, useColorSchemeVar, BaseStyles} from './components/FeatureFlaggedTheming' +export { + ThemeProvider, + useTheme, + useColorSchemeVar, + BaseStyles, + type ThemeProviderProps, + type BaseStylesProps, +} from './components/FeatureFlaggedTheming' export {merge} from '@primer/react' export {theme} from '@primer/react' export {themeGet} from '@primer/react'