From 8da55107106374288142cb218eafea63338902c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B4mulo=20Penido?= Date: Tue, 10 Sep 2024 21:41:05 -0300 Subject: [PATCH 1/3] fix: `Toast` children prop type --- src/Toast/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Toast/index.jsx b/src/Toast/index.jsx index 11461666c2..0e1f33c851 100644 --- a/src/Toast/index.jsx +++ b/src/Toast/index.jsx @@ -78,7 +78,7 @@ Toast.defaultProps = { Toast.propTypes = { /** A string or an element that is rendered inside the main body of the `Toast`. */ - children: PropTypes.string.isRequired, + children: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired, /** * A function that is called on close. It can be used to perform * actions upon closing of the `Toast`, such as setting the "show" From ec4eb2fab687f3549760346dc1a5411f7c3e92c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B4mulo=20Penido?= Date: Wed, 11 Sep 2024 14:16:58 -0300 Subject: [PATCH 2/3] fix: use PropTypes.node to better coverage Co-authored-by: Braden MacDonald --- src/Toast/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Toast/index.jsx b/src/Toast/index.jsx index 0e1f33c851..1407e826a6 100644 --- a/src/Toast/index.jsx +++ b/src/Toast/index.jsx @@ -78,7 +78,7 @@ Toast.defaultProps = { Toast.propTypes = { /** A string or an element that is rendered inside the main body of the `Toast`. */ - children: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired, + children: PropTypes.node.isRequired, /** * A function that is called on close. It can be used to perform * actions upon closing of the `Toast`, such as setting the "show" From f6de16cb2df6ec5e08f4190bf37e2af44d47eb5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B4mulo=20Penido?= Date: Wed, 11 Sep 2024 14:18:00 -0300 Subject: [PATCH 3/3] docs: fix docstring --- src/Toast/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Toast/index.jsx b/src/Toast/index.jsx index 1407e826a6..2bc75e7683 100644 --- a/src/Toast/index.jsx +++ b/src/Toast/index.jsx @@ -77,7 +77,7 @@ Toast.defaultProps = { }; Toast.propTypes = { - /** A string or an element that is rendered inside the main body of the `Toast`. */ + /** A node that is rendered inside the main body of the `Toast`. */ children: PropTypes.node.isRequired, /** * A function that is called on close. It can be used to perform