feat: enlarge the interactive area of the close button (#483)

This commit is contained in:
Kaffi Y. 2024-09-18 22:46:09 +08:00 committed by GitHub
parent b8b94ac6c4
commit 3cc7c2117d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 18 additions and 2 deletions

View File

@ -2,6 +2,7 @@ import { repository } from "@pkg"
import i18next from "i18next"
import type { FC } from "react"
import { Suspense, useDeferredValue, useEffect, useLayoutEffect, useState } from "react"
import { useTranslation } from "react-i18next"
import { MotionButtonBase } from "~/components/ui/button"
import { useCurrentModal } from "~/components/ui/modal"
@ -44,10 +45,15 @@ export const SettingModalContent: FC<{
const Close = () => {
const { dismiss } = useCurrentModal()
const { t } = useTranslation("common")
return (
<MotionButtonBase className="absolute right-8 top-8 z-[99]" onClick={dismiss}>
<i className="i-mgc-close-cute-re" />
<MotionButtonBase
aria-label={t("close")}
className="absolute right-6 top-6 z-[99] flex size-8 items-center justify-center rounded-md duration-200 hover:bg-theme-button-hover"
onClick={dismiss}
>
<i className="i-mgc-close-cute-re block" />
</MotionButtonBase>
)
}

View File

@ -1,6 +1,7 @@
{
"app.copied_to_clipboard": "تم النسخ إلى الحافظة",
"cancel": "إلغاء",
"close": "إغلاق",
"confirm": "تأكيد",
"ok": "موافق",
"quantifier.piece": "",

View File

@ -1,6 +1,7 @@
{
"app.copied_to_clipboard": "تم النسخ إلى الحافظة",
"cancel": "إلغاء",
"close": "إغلاق",
"confirm": "تأكيد",
"ok": "موافق",
"quantifier.piece": "",

View File

@ -1,6 +1,7 @@
{
"app.copied_to_clipboard": "تم النسخ إلى الحافظة",
"cancel": "إلغاء",
"close": "إغلاق",
"confirm": "تأكيد",
"ok": "حسنًا",
"quantifier.piece": "",

View File

@ -1,6 +1,7 @@
{
"app.copied_to_clipboard": "Copied to clipboard",
"cancel": "Cancel",
"close": "Close",
"confirm": "Confirm",
"ok": "OK",
"quantifier.piece": "",

View File

@ -1,6 +1,7 @@
{
"app.copied_to_clipboard": "Copiado al portapapeles",
"cancel": "Cancelar",
"close": "Cerrar",
"confirm": "Confirmar",
"ok": "OK",
"quantifier.piece": "",

View File

@ -1,6 +1,7 @@
{
"app.copied_to_clipboard": "Copié dans le presse-papier",
"cancel": "Annuler",
"close": "Fermer",
"confirm": "Confirmer",
"ok": "OK",
"quantifier.piece": "",

View File

@ -1,6 +1,7 @@
{
"app.copied_to_clipboard": "クリップボードにコピーしました",
"cancel": "キャンセル",
"close": "閉じる",
"confirm": "確認",
"ok": "OK",
"quantifier.piece": "個",

View File

@ -1,6 +1,7 @@
{
"app.copied_to_clipboard": "Copiado para a área de transferência",
"cancel": "Cancelar",
"close": "Fechar",
"confirm": "Confirmar",
"ok": "OK",
"quantifier.piece": "",

View File

@ -1,6 +1,7 @@
{
"app.copied_to_clipboard": "已复制到剪贴板",
"cancel": "取消",
"close": "关闭",
"confirm": "确认",
"ok": "好",
"quantifier.piece": "条",

View File

@ -1,6 +1,7 @@
{
"app.copied_to_clipboard": "已複製到剪貼簿",
"cancel": "取消",
"close": "關閉",
"confirm": "確認",
"ok": "確定",
"quantifier.piece": "",