refactor: simplify close button to transparent X icon only
This commit is contained in:
parent
56980eebd3
commit
8ddca4d647
1 changed files with 12 additions and 3 deletions
|
|
@ -245,9 +245,18 @@ export const NodeEditDialog: FC<NodeEditDialogProps> = ({
|
|||
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||
<DialogContent className="max-w-lg dark:bg-zinc-900 dark:text-zinc-100 dark:border-zinc-700 bg-white text-zinc-900">
|
||||
<DialogContent className="max-w-lg dark:bg-zinc-900 dark:text-zinc-100 dark:border-zinc-700 bg-white text-zinc-900" showCloseButton={false}>
|
||||
<DialogHeader>
|
||||
<DialogTitle>Edit {typeLabel}</DialogTitle>
|
||||
<DialogTitle className="flex items-center justify-between">
|
||||
<span>Edit {typeLabel}</span>
|
||||
<button
|
||||
onClick={() => onOpenChange(false)}
|
||||
className="p-0.5 hover:bg-zinc-100 dark:hover:bg-zinc-800 text-zinc-500 transition-colors"
|
||||
aria-label="Close"
|
||||
>
|
||||
<XIcon className="size-4" />
|
||||
</button>
|
||||
</DialogTitle>
|
||||
</DialogHeader>
|
||||
{renderFields()}
|
||||
<DialogFooter className="gap-2">
|
||||
|
|
@ -260,7 +269,7 @@ export const NodeEditDialog: FC<NodeEditDialogProps> = ({
|
|||
</Button>
|
||||
<Button
|
||||
onClick={handleSave}
|
||||
className="dark:bg-blue-600 dark:hover:bg-blue-700 dark:text-white"
|
||||
className="bg-blue-600 hover:bg-blue-700 text-white"
|
||||
>
|
||||
Save
|
||||
</Button>
|
||||
|
|
|
|||
Loading…
Reference in a new issue