diff --git a/app/components/Attribute.tsx b/app/components/Attribute.tsx index 8b89f0f..3cd4f4a 100644 --- a/app/components/Attribute.tsx +++ b/app/components/Attribute.tsx @@ -1,5 +1,6 @@ import { ClipboardIcon } from '@heroicons/react/24/outline' -import toast from 'react-hot-toast/headless' + +import { toast } from './Toaster' type Properties = { readonly name: string; diff --git a/app/components/Dialog.tsx b/app/components/Dialog.tsx index c958604..1243bd0 100644 --- a/app/components/Dialog.tsx +++ b/app/components/Dialog.tsx @@ -1,3 +1,4 @@ +/* eslint-disable unicorn/no-keyword-prefix */ import { type Dispatch, type ReactNode, type SetStateAction } from 'react' import { Button as AriaButton, @@ -20,7 +21,9 @@ function Button(properties: ButtonProperties) { {...properties} aria-label='Dialog' className={cn( - 'outline-none', + 'w-fit text-sm rounded-lg px-4 py-2', + 'bg-main-700 dark:bg-main-800 text-white', + properties.isDisabled && 'opacity-50 cursor-not-allowed', properties.className )} // If control is passed, set the state value @@ -42,11 +45,12 @@ function Action(properties: ActionProperties) { type={properties.variant === 'confirm' ? 'submit' : 'button'} className={cn( 'px-4 py-2 rounded-lg', + properties.isDisabled && 'opacity-50 cursor-not-allowed', properties.variant === 'cancel' ? 'text-ui-700 dark:text-ui-300' - : 'text-ui-950 dark:text-ui-50', + : 'text-ui-300 dark:text-ui-300', properties.variant === 'confirm' - ? 'bg-blue-500 hover:bg-blue-600 pressed:bg-blue-700 text-white' + ? 'bg-main-700 dark:bg-main-700 pressed:bg-main-800 dark:pressed:bg-main-800' : 'bg-ui-200 dark:bg-ui-800 pressed:bg-ui-300 dark:pressed:bg-ui-700', properties.className )} @@ -82,9 +86,10 @@ function Text(properties: React.HTMLProps) { type PanelProperties = { readonly children: (close: () => void) => ReactNode; readonly control?: [boolean, Dispatch>]; + readonly className?: string; } -function Panel({ children, control }: PanelProperties) { +function Panel({ children, control, className }: PanelProperties) { return (