Skip to content

Commit

Permalink
fix(Input): placeholder contrasts
Browse files Browse the repository at this point in the history
  • Loading branch information
kripod committed Jul 19, 2024
1 parent cc7e34a commit 88c953b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/InputFilled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const InputFilled = forwardRef(function InputFilled(
className={clsx(
className,
controlClassName({ size, shape }),
"bg-ui-neutral-200 text-ui-neutral-950 placeholder:text-ui-neutral-600 aria-invalid:ring-2 aria-invalid:ring-inset aria-invalid:ring-ui-danger-600",
"bg-ui-neutral-200 text-ui-neutral-950 placeholder:text-ui-neutral-950/65 aria-invalid:ring-2 aria-invalid:ring-inset aria-invalid:ring-ui-danger-600",
size === "sm" && "px-2.5",
size === "md" && "px-3",
size === "lg" && "px-4",
Expand Down
2 changes: 1 addition & 1 deletion src/components/InputOutlined.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const InputOutlined = forwardRef(function InputOutlined(
className={clsx(
className,
controlClassName({ size, shape }),
"bg-ui-neutral-50 text-ui-neutral-800 ring-1 ring-inset ring-ui-neutral-600 placeholder:text-ui-neutral-500 aria-invalid:ring-2 aria-invalid:ring-ui-danger-600",
"bg-ui-neutral-50 text-ui-neutral-950 ring-1 ring-inset ring-ui-neutral-600 placeholder:text-ui-neutral-950/65 aria-invalid:ring-2 aria-invalid:ring-ui-danger-600",
size === "sm" && "px-2.5",
size === "md" && "px-3",
size === "lg" && "px-4",
Expand Down
2 changes: 1 addition & 1 deletion src/utils/controlClassName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function isEquilateral(shape: ControlProps["shape"]) {

export function controlClassName({ size, shape }: ControlProps) {
return clsx(
"transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ui-accent-600 disabled:pointer-events-none disabled:opacity-40",
"transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ui-accent-600 disabled:pointer-events-none disabled:opacity-35",
size === "sm" && clsx("h-8 text-base/none", isEquilateral(shape) && "w-8"),
size === "md" &&
clsx("h-10 text-base/none", isEquilateral(shape) && "w-10"),
Expand Down

0 comments on commit 88c953b

Please sign in to comment.