Fix checkbox disabled styling
This commit is contained in:
@@ -14,14 +14,18 @@ export const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(
|
|||||||
ref={ref}
|
ref={ref}
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
className={`h-4 w-4 rounded border-transparent bg-orange-100 text-orange-500 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-orange-500 ${
|
className={`h-4 w-4 rounded border-transparent bg-orange-100 text-orange-500 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-orange-500 ${
|
||||||
disabled ? "cursor-not-allowed text-orange-200" : ""
|
disabled ? "cursor-not-allowed bg-orange-50 text-orange-200" : ""
|
||||||
}`}
|
}`}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
{...rest}
|
{...rest}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="ml-3 text-sm">
|
<div className="ml-3 text-sm">
|
||||||
<label htmlFor="comments" className="font-medium text-gray-700">
|
<label
|
||||||
|
className={`font-medium ${
|
||||||
|
disabled ? "text-gray-500" : "text-gray-700"
|
||||||
|
}`}
|
||||||
|
>
|
||||||
{label}
|
{label}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user