From 53206a96088a4069ff9c9055265337a3c3863d74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Chucks=20=F0=9F=87=AC=F0=9F=87=AD?= <31349069+emmanuelchucks@users.noreply.github.com> Date: Sun, 24 May 2026 22:43:48 +0000 Subject: [PATCH] fix: avoid walking ref props in styled mappings --- src/runtime.types.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/runtime.types.ts b/src/runtime.types.ts index 6e8f9ad8..f7cc0fdd 100644 --- a/src/runtime.types.ts +++ b/src/runtime.types.ts @@ -6,6 +6,7 @@ import type { ComponentType, ForwardRefExoticComponent, FunctionComponent, + PropsWithoutRef, ReactElement, } from "react"; import type { @@ -84,15 +85,15 @@ interface StyledConfigurationObject< > { target: T; nativeStyleMapping?: T extends false - ? NativeStyleMapping> + ? NativeStyleMapping>> : NativeStyleMapping< ResolveDotPath>, - ComponentProps + PropsWithoutRef> >; /** @deprecated Please use nativeStyleMapping */ nativeStyleToProp?: NativeStyleMapping< ResolveDotPath>, - ComponentProps + PropsWithoutRef> >; } @@ -119,7 +120,7 @@ export type ReactComponent

= | ForwardRefExoticComponent

; export type ComponentPropsDotNotation = DotNotation< - ComponentProps + PropsWithoutRef> >; /******************************** Styles ********************************/