Skip to content

Commit 8b47b87

Browse files
authored
Merge pull request #57 from gregberge/avoid-forwarding-as-child
fix: avoid forwarding `asChild` prop
2 parents e89ce19 + 9e3a939 commit 8b47b87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export const createTwc = <TCompose extends AbstractCompose = typeof clsx>(
160160
)
161161
: compose(resClassName, classNameProp)
162162
}
163-
asChild={forwardAsChild ? asChild : undefined}
163+
{...(forwardAsChild ? { asChild } : {})}
164164
{...fp}
165165
/>
166166
);

0 commit comments

Comments
 (0)