diff --git a/packages/react/src/components/Tag/Tag.js b/packages/react/src/components/Tag/Tag.js index ca8c142d8f91..486db4617673 100644 --- a/packages/react/src/components/Tag/Tag.js +++ b/packages/react/src/components/Tag/Tag.js @@ -56,33 +56,39 @@ const Tag = ({ } }; - return filter ? ( -
- - {children !== null && children !== undefined ? children : TYPES[type]} - - -
- ) : ( -
+ if (filter) { + return ( +
+ + {children !== null && children !== undefined ? children : TYPES[type]} + + +
+ ); + } + + const ComponentTag = other.onClick ? 'button' : 'div'; + + return ( + {CustomIconElement ? (
@@ -93,7 +99,7 @@ const Tag = ({ {children !== null && children !== undefined ? children : TYPES[type]} -
+
); };