From ea6926cad3de64173d39717444e42aad62c68d1a Mon Sep 17 00:00:00 2001 From: Yidadaa Date: Thu, 29 Jun 2023 00:09:56 +0800 Subject: [PATCH] feat: replace window.prompt with showPrompt --- app/components/button.module.scss | 9 ++-- app/components/button.tsx | 4 ++ app/components/chat.tsx | 13 +++-- app/components/ui-lib.module.scss | 20 +++++++ app/components/ui-lib.tsx | 86 +++++++++++++++++++++++++++++++ app/icons/cancel.svg | 1 + app/icons/confirm.svg | 1 + app/styles/globals.scss | 3 ++ 8 files changed, 128 insertions(+), 9 deletions(-) create mode 100644 app/icons/cancel.svg create mode 100644 app/icons/confirm.svg diff --git a/app/components/button.module.scss b/app/components/button.module.scss index 5aa53dcf..27e4278b 100644 --- a/app/components/button.module.scss +++ b/app/components/button.module.scss @@ -27,6 +27,11 @@ fill: white !important; } } + + &:hover, + &:focus { + border-color: var(--primary); + } } .shadow { @@ -37,10 +42,6 @@ border: var(--border-in-light); } -.icon-button:hover { - border-color: var(--primary); -} - .icon-button-icon { width: 16px; height: 16px; diff --git a/app/components/button.tsx b/app/components/button.tsx index f93741b3..51698d07 100644 --- a/app/components/button.tsx +++ b/app/components/button.tsx @@ -12,6 +12,8 @@ export function IconButton(props: { className?: string; title?: string; disabled?: boolean; + tabIndex?: number; + autoFocus?: boolean; }) { return (