diff --git a/packages/react/shared.ts b/packages/react/shared.ts index 1435f70..7a181de 100644 --- a/packages/react/shared.ts +++ b/packages/react/shared.ts @@ -143,18 +143,15 @@ export function vcn({ * Otherwise, it will parse A as variant props. * * @param anyProps - Any props that have passed to the component. - * @param options - Options. * @returns [variantProps, otherProps] */ - (anyProps, options = {}) => { + (anyProps) => { const variantKeys = Object.keys(variants) as (keyof V)[]; return Object.entries(anyProps).reduce( ([variantProps, otherProps], [key, value]) => { if ( - variantKeys.includes(key) || - (!options.excludeClassName && key === "className") || - (!options.excludePreset && key === "preset") + variantKeys.includes(key) ) { return [{ ...variantProps, [key]: value }, otherProps]; } @@ -162,8 +159,8 @@ export function vcn({ }, [{}, {}] ) as [ - Partial> & { className?: string }, - Omit> | "className">, + Partial>, + Omit> | "preset" | "className">, ]; }, ];