Skip to content

Commit 0d63626

Browse files
fix(app): fix contrast ratio issues and more (#429)
* fix(app): adjust contrast ratio of Select component * fix(app): adjust contrast ratio of Button component * feat(app): add a 'not-allowed' cursor style to disabled Button * Adjust CloseButton color on different themes * Adjust CloseButton color on different themes - standardize * Change color of Select caret when dark mode is enabled
1 parent 8737359 commit 0d63626

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

apps/app/src/components/Button/Button.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ const variants = {
66
branding:
77
"text-violet-700 dark:text-neutral-200 border-violet-700 dark:border-neutral-200 bg-transparent hover:bg-violet-50 hover:dark:bg-violet-900 focus:shadow-[0_0_10px] focus:shadow-primary",
88
brandingInverse:
9-
"border-white bg-primary text-white transition-opacity hover:bg-violet-200 focus:shadow-[0_0_10px] focus:shadow-white disabled:opacity-50 hover:dark:bg-violet-700",
9+
"border-white bg-primary text-white hover:text-violet-700 dark:hover:text-white transition-opacity hover:bg-violet-200 focus:shadow-[0_0_10px] focus:shadow-white disabled:opacity-50 hover:dark:bg-violet-700",
1010
alternative:
11-
"text-white border-white bg-yellow-branding hover:bg-yellow-branding-dark focus:shadow-[0_0_10px] focus:shadow-yellow-branding",
11+
"text-white-dark border-white-dark bg-yellow-branding hover:bg-yellow-branding-dark focus:shadow-[0_0_10px] focus:shadow-yellow-branding",
1212
};
1313

1414
type ButtonProps = Readonly<{
@@ -19,7 +19,7 @@ type ButtonProps = Readonly<{
1919
export const Button = ({ variant, className, ...props }: ButtonProps) => (
2020
<button
2121
className={twMerge(
22-
"min-w-[160px] appearance-none rounded-md border border-transparent px-8 py-1 text-sm leading-8 transition-colors duration-100 sm:py-0",
22+
"min-w-[160px] appearance-none rounded-md border border-transparent px-8 py-1 text-sm leading-8 transition-colors duration-100 disabled:cursor-not-allowed sm:py-0",
2323
variants[variant],
2424
className,
2525
)}

apps/app/src/components/CloseButton/CloseButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ButtonHTMLAttributes } from "react";
44
export const CloseButton = ({ className, ...props }: ButtonHTMLAttributes<HTMLButtonElement>) => (
55
<button
66
className={twMerge(
7-
"flex h-8 w-8 appearance-none items-center justify-center rounded-full text-4xl text-violet-200 transition-colors duration-100 hover:bg-primary hover:text-white focus:shadow-[0_0_10px] focus:shadow-primary focus:outline-none dark:text-violet-700 dark:hover:text-white",
7+
"flex h-8 w-8 appearance-none items-center justify-center rounded-full text-4xl text-violet-200 transition-colors duration-100 hover:bg-primary hover:text-white focus:shadow-[0_0_10px] focus:shadow-primary focus:outline-none dark:hover:bg-violet-700",
88
className,
99
)}
1010
{...props}

apps/app/src/components/Select/Select.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const variants = {
55
default:
66
"select bg-white py-1 pl-1 pr-6 text-neutral-700 dark:bg-white-dark dark:text-neutral-200",
77
purple:
8-
"select-purple border-b border-primary bg-transparent py-2 pr-6 pl-1 capitalize text-primary transition-shadow duration-100 focus:shadow-[0_0_10px] focus:shadow-primary dark:border-neutral-200 dark:text-neutral-200 dark:focus:shadow-white",
8+
"select-purple dark:select border-b border-primary bg-transparent py-2 pr-6 pl-1 capitalize text-primary transition-shadow duration-100 focus:shadow-[0_0_10px] focus:shadow-primary dark:border-neutral-200 dark:text-neutral-200 dark:focus:shadow-white dark:bg-white-dark",
99
};
1010

1111
type SelectProps = Readonly<{

0 commit comments

Comments
 (0)