From e7751da15e811698b0a6f3f6a4f903f21d0fbc90 Mon Sep 17 00:00:00 2001 From: Roman Karpov Date: Fri, 1 Dec 2023 15:12:10 +0100 Subject: [PATCH] fix: clearer storybook --- .../__stories__/CustomComponent/CustomComponent.scss | 8 ++------ .../__stories__/CustomComponent/CustomComponent.tsx | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/navigation/__stories__/CustomComponent/CustomComponent.scss b/src/navigation/__stories__/CustomComponent/CustomComponent.scss index 76c8c15da..8521f003e 100644 --- a/src/navigation/__stories__/CustomComponent/CustomComponent.scss +++ b/src/navigation/__stories__/CustomComponent/CustomComponent.scss @@ -1,9 +1,5 @@ -@import '../../../../styles/variables'; - -.dropdown-navigation-item { - text-wrap: nowrap; - display: flex; - align-items: center; +.custom-nav-item { + white-space: nowrap; &:hover { color: var(--g-color-text-brand); diff --git a/src/navigation/__stories__/CustomComponent/CustomComponent.tsx b/src/navigation/__stories__/CustomComponent/CustomComponent.tsx index c02614291..eb49b4c0b 100644 --- a/src/navigation/__stories__/CustomComponent/CustomComponent.tsx +++ b/src/navigation/__stories__/CustomComponent/CustomComponent.tsx @@ -5,7 +5,7 @@ import {NavigationItemProps} from '../../models'; import './CustomComponent.scss'; -const b = cn('dropdown-navigation-item'); +const b = cn('custom-nav-item'); type DCDropdownNavigationItemProps = Pick< NavigationItemProps, @@ -16,11 +16,7 @@ export const CustomComponent: React.FC = (props) const {onClick, isActive, menuLayout} = props; return (
- Custom Item - {' ('} - {`${menuLayout}`} - {isActive && ' - active'} - {')'} + {`Custom Item (${menuLayout}${isActive ? ' - active' : ''})`}
); };