From 002099497b7efb8b3e20780d6a5bc753060e0aa2 Mon Sep 17 00:00:00 2001 From: Chady Chaito Date: Wed, 9 Aug 2023 13:40:55 -0300 Subject: [PATCH] feat(banner/web): message prop now accepts react element --- packages/yoga/src/Banner/web/Banner.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/yoga/src/Banner/web/Banner.jsx b/packages/yoga/src/Banner/web/Banner.jsx index 9dc17e6dab..b699caf005 100644 --- a/packages/yoga/src/Banner/web/Banner.jsx +++ b/packages/yoga/src/Banner/web/Banner.jsx @@ -5,8 +5,10 @@ import { borders, margins, paddings } from '@gympass/yoga-system'; import { checkPropTypes, elementType, + element, func, oneOf, + oneOfType, shape, string, } from 'prop-types'; @@ -113,7 +115,7 @@ Banner.propTypes = { /** style the banner following the theme (success, informative, attention) */ variant: oneOf(['success', 'informative', 'attention']), /** the message to display */ - message: string.isRequired, + message: oneOfType([string, element]).isRequired, /** the label and action fuction are required for banner action buttons */ primaryButton: BannerActionButtonType, /** the secondary button should only be used assemble the primary button (the label and action fuction are required for banner action buttons). */