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

Commit

Permalink
fix: theme passing props
Browse files Browse the repository at this point in the history
  • Loading branch information
ankit-tailor committed Oct 18, 2023
1 parent 3ea1418 commit 93599d6
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions packages/react/src/styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,7 @@ export function verboseStyled<P, Variants, ComCon>(

const {
variantProps: defaultVariantProps,
restProps: defaultComponentPropsWithoutVariants,
restProps: defaultThemePropsWithoutVariants,
} = getVariantProps(themeDefaultProps, theme);

const {
Expand Down Expand Up @@ -1384,7 +1384,7 @@ export function verboseStyled<P, Variants, ComCon>(
const defaultResolvedInlineProps = resolveInlineProps(
componentStyleConfig,
componentExtendedConfig,
defaultComponentPropsWithoutVariants,
defaultThemePropsWithoutVariants,
CONFIG
);

Expand All @@ -1404,17 +1404,19 @@ export function verboseStyled<P, Variants, ComCon>(

const { sx: filteredComponentSx, rest: filteredComponentRemainingProps } =
convertUtiltiyToSXFromProps(
Object.assign(
defaultComponentPropsWithoutVariants,
inlineComponentPropsWithoutVariants
),
// Object.assign(
// defaultThemePropsWithoutVariants,
inlineComponentPropsWithoutVariants,
styledSystemProps,
componentStyleConfig
);

let { sx: filteredPassingSx, rest: filteredPassingRemainingProps } =
convertUtiltiyToSXFromProps(
shallowMerge({ ...passingProps }, applyAncestorPassingProps),
shallowMerge(
{ ...defaultThemePropsWithoutVariants, ...passingProps },
applyAncestorPassingProps
),
styledSystemProps,
componentStyleConfig
);
Expand Down

0 comments on commit 93599d6

Please sign in to comment.