From: Ajay Bura Date: Sun, 20 Feb 2022 14:43:59 +0000 (+0530) Subject: Add ability to pass node in dialog title X-Git-Tag: v1.8.0~73 X-Git-Url: https://git.wafflesoft.org/?a=commitdiff_plain;h=44544f32898956ebdb9076320b8738100db40f11;p=rainny.git Add ability to pass node in dialog title Signed-off-by: Ajay Bura --- diff --git a/src/app/molecules/dialog/Dialog.jsx b/src/app/molecules/dialog/Dialog.jsx index 4d67597..93307dc 100644 --- a/src/app/molecules/dialog/Dialog.jsx +++ b/src/app/molecules/dialog/Dialog.jsx @@ -27,7 +27,11 @@ function Dialog({
- {twemojify(title)} + { + typeof title === 'string' + ? {twemojify(title)} + : title + } {contentOptions}
@@ -56,7 +60,7 @@ Dialog.defaultProps = { Dialog.propTypes = { className: PropTypes.string, isOpen: PropTypes.bool.isRequired, - title: PropTypes.string.isRequired, + title: PropTypes.node.isRequired, contentOptions: PropTypes.node, onAfterOpen: PropTypes.func, onAfterClose: PropTypes.func,