diff --git a/src-docs/src/views/comment/comment_example.js b/src-docs/src/views/comment/comment_example.js
index c112a2b91cd..e0adc1e990d 100644
--- a/src-docs/src/views/comment/comment_example.js
+++ b/src-docs/src/views/comment/comment_example.js
@@ -65,6 +65,7 @@ const commentActionsSnippet = `) {
let childItems;
@@ -104,17 +105,21 @@ export function EuiSideNavItem<
if (icon) {
buttonIcon = cloneElement(icon, {
- className: 'euiSideNavItemButton__icon',
+ className: classNames('euiSideNavItemButton__icon', icon.props.className),
});
}
- const classes = classNames('euiSideNavItem', {
- 'euiSideNavItem--root': depth === 0,
- 'euiSideNavItem--rootIcon': depth === 0 && icon,
- 'euiSideNavItem--trunk': depth === 1,
- 'euiSideNavItem--branch': depth > 1,
- 'euiSideNavItem--hasChildItems': !!childItems,
- });
+ const classes = classNames(
+ 'euiSideNavItem',
+ {
+ 'euiSideNavItem--root': depth === 0,
+ 'euiSideNavItem--rootIcon': depth === 0 && icon,
+ 'euiSideNavItem--trunk': depth === 1,
+ 'euiSideNavItem--branch': depth > 1,
+ 'euiSideNavItem--hasChildItems': !!childItems,
+ },
+ className
+ );
const buttonClasses = classNames('euiSideNavItemButton', {
'euiSideNavItemButton--isClickable': onClick || href,