diff --git a/index.d.ts b/index.d.ts index d36ce4bb1..aa3e02582 100644 --- a/index.d.ts +++ b/index.d.ts @@ -337,9 +337,11 @@ type PolymorphicBoxPropsOrTokens = Omit< TokenizableProps > & { [key in TokenizableProps]?: string } -export type StyleProps = { - [key in ComponentPseudoSelectors]: PolymorphicBoxPropsOrTokens -} & PolymorphicBoxPropsOrTokens +export type StyleProps = Omit, 'selectors'> & { + selectors: Partial<{ + [key in ComponentPseudoSelectors]: PolymorphicBoxPropsOrTokens + }> +} export type ComponentStyle = { baseStyle?: Partial> diff --git a/index.test-d.ts b/index.test-d.ts index 367982265..3108e740b 100644 --- a/index.test-d.ts +++ b/index.test-d.ts @@ -34,11 +34,13 @@ const themeOverridesOrAdditions: ThemeOverrides = { primary: { color: 'white', backgroundColor: '#fc7ef8', - _hover: { - backgroundColor: '#fc03f0' - }, - _focus: { - boxShadow: '0 0 0 2px #fccafa' + selectors: { + _hover: { + backgroundColor: '#fc03f0' + }, + _focus: { + boxShadow: '0 0 0 2px #fccafa' + } } }, warning: {