added nonClosable MessageAttributes

This commit is contained in:
Abhinav-grd 2021-05-11 13:06:14 +05:30
parent e328bda2b0
commit e9960c70b6

View file

@ -5,6 +5,7 @@ import constants from 'utils/strings/constants';
export interface MessageAttributes {
title?: string;
staticBackdrop?: boolean;
nonClosable?: boolean;
content?: any;
close?: { text?: string; variant?: string };
proceed?: {
@ -35,10 +36,14 @@ export default function MessageDialog({
return (
<Modal
{...props}
onHide={attributes.nonClosable ? () => null : props.onHide}
centered
backdrop={attributes.staticBackdrop ? 'static' : 'true'}
>
<Modal.Header style={{ borderBottom: 'none' }} closeButton>
<Modal.Header
style={{ borderBottom: 'none' }}
closeButton={!attributes.nonClosable}
>
{attributes.title && (
<Modal.Title>
<strong>{attributes.title}</strong>