From e219a4de5b18224aa59e317badd02f7af698214f Mon Sep 17 00:00:00 2001 From: Abhinav Date: Tue, 1 Nov 2022 10:28:24 +0530 Subject: [PATCH] update notification component --- src/components/Notification.tsx | 43 +++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/src/components/Notification.tsx b/src/components/Notification.tsx index f7afbeb7e..95e8cfdb5 100644 --- a/src/components/Notification.tsx +++ b/src/components/Notification.tsx @@ -30,7 +30,7 @@ export default function Notification({ open, onClose, attributes }: Iprops) { }; const handleClick = () => { - attributes.action?.callback(); + attributes?.onClick(); onClose(); }; return ( @@ -55,27 +55,34 @@ export default function Notification({ open, onClose, attributes }: Iprops) { spacing={2} direction="row" alignItems={'center'}> - {attributes?.icon ?? } + {attributes?.startIcon ?? } - - {attributes.message}{' '} - - {attributes?.action && ( - - {attributes?.action.text} - - )} + {attributes.subtext && ( + + {attributes.subtext} + + )} + {attributes.message && ( + + {attributes.message} + + )} + - - - + {attributes?.endIcon ? ( + + {attributes?.endIcon} + + ) : ( + + + + )}