From bc59cf769d24ac66061b78424db0732f164ce387 Mon Sep 17 00:00:00 2001 From: Mohammer5 Date: Mon, 15 Jul 2024 11:19:35 +0200 Subject: [PATCH] fix(modal types): accept ReactNodes as children --- components/modal/src/modal-title/modal-title.js | 2 +- components/modal/types/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/modal/src/modal-title/modal-title.js b/components/modal/src/modal-title/modal-title.js index 5ac103b05a..95c32c2c1c 100644 --- a/components/modal/src/modal-title/modal-title.js +++ b/components/modal/src/modal-title/modal-title.js @@ -26,6 +26,6 @@ ModalTitle.defaultProps = { } ModalTitle.propTypes = { - children: PropTypes.string, + children: PropTypes.node, dataTest: PropTypes.string, } diff --git a/components/modal/types/index.d.ts b/components/modal/types/index.d.ts index ac9673c8bf..601f493717 100644 --- a/components/modal/types/index.d.ts +++ b/components/modal/types/index.d.ts @@ -36,7 +36,7 @@ export interface ModalContentProps { export const ModalContent: React.FC export interface ModalTitleProps { - children?: string + children?: React.ReactNode dataTest?: string }