Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Commit

Permalink
fix: as props spepcificity
Browse files Browse the repository at this point in the history
  • Loading branch information
ankit-tailor committed Sep 6, 2023
1 parent 30662e5 commit 1c0cbe6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/react/src/styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -704,8 +704,8 @@ export function getVariantProps(
variantProps[variant] = props[variant];

restProps = {
...restProps,
...theme?.variants[variant][props[variant]]?.props,
...restProps,
};

if (shouldDeleteVariants) {
Expand Down Expand Up @@ -924,7 +924,6 @@ export function verboseStyled<P, Variants, ComCon>(

const NewComp = (
{
as,
children,
//@ts-ignore
orderedResolved: BUILD_TIME_ORDERED_RESOLVED = [],
Expand Down Expand Up @@ -1722,10 +1721,7 @@ export function verboseStyled<P, Variants, ComCon>(
// activeTheme
);
const AsComp: any =
(as as any) ||
resolvedStyleProps.as ||
(passingProps.as as any) ||
undefined;
resolvedStyleProps.as || (passingProps.as as any) || undefined;

let resolvedStyleMemo = [passingProps?.style, ...resolvedStyleProps?.style];
if (Platform.OS === 'web') {
Expand Down

0 comments on commit 1c0cbe6

Please sign in to comment.