From f3d9c7d2eb9688a0d5b8500e0266f13afff94ffd Mon Sep 17 00:00:00 2001 From: Misode Date: Sun, 18 May 2025 01:45:27 +0200 Subject: [PATCH] Add dialog button tooltips --- src/app/components/previews/DialogPreview.tsx | 105 ++++++++++++------ src/styles/global.css | 35 +++++- 2 files changed, 103 insertions(+), 37 deletions(-) diff --git a/src/app/components/previews/DialogPreview.tsx b/src/app/components/previews/DialogPreview.tsx index 95b4d435..01808b93 100644 --- a/src/app/components/previews/DialogPreview.tsx +++ b/src/app/components/previews/DialogPreview.tsx @@ -1,6 +1,6 @@ import { Identifier, ItemStack } from 'deepslate' -import type { ComponentChild } from 'preact' -import { useEffect, useRef } from 'preact/hooks' +import type { ComponentChild, ComponentChildren } from 'preact' +import { useEffect, useRef, useState } from 'preact/hooks' import { safeJsonParse } from '../../Utils.js' import { ItemDisplay } from '../ItemDisplay.jsx' import { TextComponent } from '../TextComponent.jsx' @@ -46,7 +46,9 @@ function DialogTitle({ title }: { title: any }) { // TODO: add warning button tooltip return
-
+ +
+
} @@ -111,7 +113,7 @@ function DialogContent({ dialog }: { dialog: any }) { if (type === 'multi_action') { return {dialog.actions?.map((a: any) => -