From 341527607bfac1850096274bc2f8dd6748512745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bahad=C4=B1r=20Sofuo=C4=9Flu?= Date: Tue, 27 Sep 2022 23:43:30 +0300 Subject: [PATCH 1/2] Toast close icon fixed --- components/lib/toast/ToastMessage.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/components/lib/toast/ToastMessage.js b/components/lib/toast/ToastMessage.js index d262bea878..f4033b232a 100644 --- a/components/lib/toast/ToastMessage.js +++ b/components/lib/toast/ToastMessage.js @@ -23,13 +23,13 @@ export const ToastMessage = React.memo( props.onClose && props.onClose(messageInfo); }; - const onClick = (event) => { + const onClick = event => { if (props.onClick && !(DomHandler.hasClass(event.target, 'p-toast-icon-close') || DomHandler.hasClass(event.target, 'p-toast-icon-close-icon'))) { props.onClick(messageInfo.message); } }; - const onMouseEnter = (event) => { + const onMouseEnter = event => { props.onMouseEnter && props.onMouseEnter(event); // do not continue if the user has canceled the event @@ -44,7 +44,7 @@ export const ToastMessage = React.memo( } }; - const onMouseLeave = (event) => { + const onMouseLeave = event => { props.onMouseLeave && props.onMouseLeave(event); // do not continue if the user has canceled the event @@ -61,10 +61,12 @@ export const ToastMessage = React.memo( const createCloseIcon = () => { if (closable !== false) { return ( - +
+ +
); } From c3a7f2061619ed22ae2d5c38ad30b9d2a71451ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bahad=C4=B1r=20Sofuo=C4=9Flu?= Date: Tue, 27 Sep 2022 23:54:41 +0300 Subject: [PATCH 2/2] Lint issue --- components/lib/toast/ToastMessage.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/lib/toast/ToastMessage.js b/components/lib/toast/ToastMessage.js index f4033b232a..8cf87aed13 100644 --- a/components/lib/toast/ToastMessage.js +++ b/components/lib/toast/ToastMessage.js @@ -23,13 +23,13 @@ export const ToastMessage = React.memo( props.onClose && props.onClose(messageInfo); }; - const onClick = event => { + const onClick = (event) => { if (props.onClick && !(DomHandler.hasClass(event.target, 'p-toast-icon-close') || DomHandler.hasClass(event.target, 'p-toast-icon-close-icon'))) { props.onClick(messageInfo.message); } }; - const onMouseEnter = event => { + const onMouseEnter = (event) => { props.onMouseEnter && props.onMouseEnter(event); // do not continue if the user has canceled the event @@ -44,7 +44,7 @@ export const ToastMessage = React.memo( } }; - const onMouseLeave = event => { + const onMouseLeave = (event) => { props.onMouseLeave && props.onMouseLeave(event); // do not continue if the user has canceled the event