From d906b9ae3751171022abda094230ae1a59d1292b Mon Sep 17 00:00:00 2001 From: Frontend Developer Date: Tue, 10 Mar 2026 09:13:08 +0000 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF:=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/renderer/components/Notification.jsx | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 frontend/src/renderer/components/Notification.jsx diff --git a/frontend/src/renderer/components/Notification.jsx b/frontend/src/renderer/components/Notification.jsx new file mode 100644 index 0000000..7609b1d --- /dev/null +++ b/frontend/src/renderer/components/Notification.jsx @@ -0,0 +1,22 @@ +import React from 'react'; +import { notification } from 'antd'; + +const { success, error, warning, info } = notification; + +export const showSuccess = (message, description) => { + success({ message, description, placement: 'topRight' }); +}; + +export const showError = (message, description) => { + error({ message, description, placement: 'topRight' }); +}; + +export const showWarning = (message, description) => { + warning({ message, description, placement: 'topRight' }); +}; + +export const showInfo = (message, description) => { + info({ message, description, placement: 'topRight' }); +}; + +export default notification;