- {headerIcon}
-
{title}
+ let headerIcon;
+
+ if (iconType) {
+ headerIcon = (
+
+ );
+ }
+
+ let optionalChildren;
+ if (children && size === 's') {
+ optionalChildren =
{children};
+ } else if (children) {
+ optionalChildren =
{children};
+ }
+
+ const H: any = heading ? `${heading}` : 'span';
+ let header;
+
+ if (title) {
+ header = (
+
+ {headerIcon}
+ {title}
+
+ );
+ }
+ return (
+
+ {header}
+
+ {optionalChildren}
);
}
- return (
-
- {header}
-
- {optionalChildren}
-
- );
-};
+);
+EuiCallOut.displayName = 'EuiCallOut';
diff --git a/src/components/form/__snapshots__/form.test.tsx.snap b/src/components/form/__snapshots__/form.test.tsx.snap
index 3ed482b4053b..e0a618e5ccb3 100644
--- a/src/components/form/__snapshots__/form.test.tsx.snap
+++ b/src/components/form/__snapshots__/form.test.tsx.snap
@@ -26,6 +26,7 @@ exports[`EuiForm renders with error callout when isInvalid is "true" 1`] = `
aria-live="assertive"
class="euiCallOut euiCallOut--danger euiForm__errors"
role="alert"
+ tabindex="-1"
>