From c093a14988da636a88bc9ce2c5e7589a5a7e8f80 Mon Sep 17 00:00:00 2001 From: Mohammer5 Date: Mon, 15 Jul 2024 11:19:44 +0200 Subject: [PATCH] fix(tag types): accept ReactNodes as children --- components/tag/src/tag.js | 2 +- components/tag/types/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/tag/src/tag.js b/components/tag/src/tag.js index 6520fed456..34bf4d8d43 100644 --- a/components/tag/src/tag.js +++ b/components/tag/src/tag.js @@ -102,7 +102,7 @@ Tag.defaultProps = { Tag.propTypes = { /** Use bold tags where it is important that the tag is seen by the user in an information dense interface. Bold tags should be reserved for edge cases and not overused. */ bold: PropTypes.bool, - children: PropTypes.string, + children: PropTypes.node, className: PropTypes.string, dataTest: PropTypes.string, /** Tags can contain icons. Use icons where they will help users easily identify the content of the tag. Tags must have a text label and cannot display only an icon. */ diff --git a/components/tag/types/index.d.ts b/components/tag/types/index.d.ts index 2a66f9ee9b..518da25947 100644 --- a/components/tag/types/index.d.ts +++ b/components/tag/types/index.d.ts @@ -5,7 +5,7 @@ export interface TagProps { * Use bold tags where it is important that the tag is seen by the user in an information dense interface. Bold tags should be reserved for edge cases and not overused. */ bold?: boolean - children?: string + children?: React.ReactNode className?: string dataTest?: string /**