Skip to content
This repository was archived by the owner on Apr 25, 2026. It is now read-only.

Commit 4b9610f

Browse files
authored
fix: VariantProps symbol type error (#757)
* fix: VariantProps symbol type error * fix: add string to key type
1 parent bfc1851 commit 4b9610f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/core/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export type PropertyValue<K extends keyof CSSUtil.CSSProperties> = { readonly [C
3939
export type ScaleValue<K> = { readonly [CSSUtil.$$ScaleValue]: K }
4040

4141
/** Returns a type that suggests variants from a component as possible prop values. */
42-
export type VariantProps<Component> = StyledComponent.TransformProps<Component[StyledComponent.$$StyledComponentProps], Component[StyledComponent.$$StyledComponentMedia]>
42+
export type VariantProps<Component extends {[key: symbol | string]: any}> = StyledComponent.TransformProps<Component[StyledComponent.$$StyledComponentProps], Component[StyledComponent.$$StyledComponentMedia]>
4343

4444
/** Map of CSS properties to token scales. */
4545
export declare const defaultThemeMap: DefaultThemeMap

0 commit comments

Comments
 (0)