fix: 分享卡片关闭按钮定位到卡片右上角

This commit is contained in:
2026-02-26 13:52:20 +08:00
parent 08eb55ca41
commit afde70c98e
+8 -10
View File
@@ -878,16 +878,14 @@ export default function ShareCardModal({
exit={{ opacity: 0, scale: 0.92 }}
transition={{ duration: 0.25, ease: "easeOut" }}
>
{/* Close button (floating) */}
<button
onClick={onClose}
className="mb-3 flex h-9 w-9 shrink-0 items-center justify-center self-end rounded-full bg-white/10 text-gray-300 transition-colors active:bg-white/20"
>
<X size={18} />
</button>
{/* Card */}
<div className="flex shrink-0 justify-center">
{/* Card + close button wrapper */}
<div className="relative flex shrink-0 justify-center">
<button
onClick={onClose}
className="absolute right-3 top-3 z-10 flex h-8 w-8 items-center justify-center rounded-full bg-black/40 text-white/70 transition-colors active:bg-black/60"
>
<X size={16} />
</button>
{imageLoading ? (
<div
style={{ width: 340, height: 400 }}