diff --git a/packages/grafana-ui/src/components/Button/ButtonContent.tsx b/packages/grafana-ui/src/components/Button/ButtonContent.tsx
index 75ec567b6a9..70ea9d6bf5b 100644
--- a/packages/grafana-ui/src/components/Button/ButtonContent.tsx
+++ b/packages/grafana-ui/src/components/Button/ButtonContent.tsx
@@ -18,13 +18,22 @@ type Props = {
export function ButtonContent(props: Props) {
const { icon, className, iconClassName, children } = props;
const styles = getStyles();
- return icon ? (
-
-
-
- {children}
-
- ) : (
- {children}
- );
+ if (icon && children) {
+ return (
+
+
+
+ {children}
+
+ );
+ }
+ if (icon) {
+ return (
+
+
+
+ );
+ }
+
+ return {children};
}