diff --git a/.changeset/moody-fans-stare.md b/.changeset/moody-fans-stare.md new file mode 100644 index 0000000000..b3e62f9aa0 --- /dev/null +++ b/.changeset/moody-fans-stare.md @@ -0,0 +1,5 @@ +--- +"@nextui-org/system-rsc": patch +--- + +Fix #1541 `extendVariants`function gives more priority to final component props over the `extendVariants` props diff --git a/packages/core/system-rsc/src/extend-variants.js b/packages/core/system-rsc/src/extend-variants.js index f14d6959b9..a25578f212 100644 --- a/packages/core/system-rsc/src/extend-variants.js +++ b/packages/core/system-rsc/src/extend-variants.js @@ -43,7 +43,7 @@ export function extendVariants(BaseComponent, styles = {}, opts = {}) { const ForwardedComponent = React.forwardRef((originalProps, ref) => { const [baseProps, variantProps] = mapPropsVariants(originalProps, customTv.variantKeys, false); - const newProps = {...baseProps, ...defaultVariants, ref}; + const newProps = {...defaultVariants, ...baseProps, ref}; let classNames = {};