feat: improve svg viewer

This commit is contained in:
Yidadaa
2023-07-06 01:33:30 +08:00
parent 6c6a2d08db
commit b718285125
3 changed files with 35 additions and 24 deletions

View File

@@ -1,3 +1,4 @@
/* eslint-disable @next/next/no-img-element */
import styles from "./ui-lib.module.scss";
import LoadingIcon from "../icons/three-dots.svg";
import CloseIcon from "../icons/close.svg";
@@ -414,3 +415,20 @@ export function showPrompt(content: any, value = "", rows = 3) {
);
});
}
export function showImageModal(img: string) {
showModal({
title: Locale.Export.Image.Modal,
children: (
<div>
<img
src={img}
alt="preview"
style={{
maxWidth: "100%",
}}
></img>
</div>
),
});
}