Skip to content

Commit

Permalink
fix: disabled style on input
Browse files Browse the repository at this point in the history
  • Loading branch information
nahoc committed Jul 16, 2024
1 parent 7efb9bd commit c11db7d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const Input = forwardRef<HTMLInputElement, InputProps>(
<input
type={type}
className={cn(
"peer flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm transition-colors file:border-0 file:bg-transparent file:font-medium file:text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
"peer flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm transition-colors file:border-0 file:bg-transparent file:font-medium file:text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-60",
startIcon && "pl-9",
endIcon && "pr-9",
className,
Expand All @@ -25,14 +25,14 @@ const Input = forwardRef<HTMLInputElement, InputProps>(
{startIcon &&
cloneElement(startIcon as ReactElement, {
className: cn(
"absolute top-2.5 left-3 size-4 text-muted-foreground peer-focus-visible:text-primary peer-disabled:text-muted",
"absolute top-2.5 left-3 size-4 text-muted-foreground peer-focus-visible:text-primary peer-disabled:opacity-60",
startIcon.props.className,
),
})}
{endIcon &&
cloneElement(endIcon as ReactElement, {
className: cn(
"absolute top-2.5 right-3 size-4 text-muted-foreground peer-focus-visible:text-primary peer-disabled:text-muted",
"absolute top-2.5 right-3 size-4 text-muted-foreground peer-focus-visible:text-primary peer-disabled:opacity-60",
endIcon.props.className,
),
})}
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@risc0/ui",
"version": "0.0.121",
"version": "0.0.122",
"private": false,
"sideEffects": false,
"type": "module",
Expand Down Expand Up @@ -42,9 +42,9 @@
"sonner": "1.5.0",
"string-ts": "2.2.0",
"tailwind-merge": "2.4.0",
"tailwindcss": "3.4.4",
"tailwindcss": "3.4.6",
"tailwindcss-animate": "1.0.7",
"typescript": "5.6.0-dev.20240715",
"typescript": "5.6.0-dev.20240716",
"vaul": "0.9.1"
},
"devDependencies": {
Expand Down

0 comments on commit c11db7d

Please sign in to comment.