Skip to content

Commit

Permalink
move input iconPosition to defaultVariants
Browse files Browse the repository at this point in the history
  • Loading branch information
Markusplay committed Feb 8, 2025
1 parent df1044c commit 4bbe257
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/ui/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ const inputVariants = cva(
},
defaultVariants: {
size: 'medium',
iconPosition: 'start',
},
},
);

const Input = React.forwardRef<HTMLInputElement, InputProps>(
({ className, type, icon, size, iconPosition = 'start', ...props }, ref) => {
({ className, type, icon, size, iconPosition, ...props }, ref) => {
const computedClass = cn(
inputVariants({ size, iconPosition }),
icon && iconPosition === 'start' ? 'pl-[40px]' : '',
Expand Down

0 comments on commit 4bbe257

Please sign in to comment.