diff --git a/src/components/AsideHeader/components/Header.tsx b/src/components/AsideHeader/components/Header.tsx index 787aadb..2bd7f0c 100644 --- a/src/components/AsideHeader/components/Header.tsx +++ b/src/components/AsideHeader/components/Header.tsx @@ -6,7 +6,7 @@ import {CompositeBar} from '../../CompositeBar/CompositeBar'; import {Logo} from '../../Logo'; import {ASIDE_HEADER_COMPACT_WIDTH, HEADER_DIVIDER_HEIGHT} from '../../constants'; import {SubheaderMenuItem} from '../../types'; -import {useAsideHeaderInnerContext} from '../AsideHeaderContext'; +import {useAsideHeaderContext, useAsideHeaderInnerContext} from '../AsideHeaderContext'; import {b} from '../utils'; import headerDividerCollapsedIcon from '../../../../assets/icons/divider-collapsed.svg'; @@ -16,6 +16,7 @@ const DEFAULT_SUBHEADER_ITEMS: SubheaderMenuItem[] = []; export const Header = () => { const {logo, onItemClick, onClosePanel, headerDecoration, subheaderItems} = useAsideHeaderInnerContext(); + const {compact} = useAsideHeaderContext(); const {onClick: onLogoClickProp} = logo; const onLogoClick = useCallback( (event: React.MouseEvent) => { @@ -27,7 +28,7 @@ export const Header = () => { return (
- + = ({ +export const Logo: React.FC = ({ text, icon, iconSrc, @@ -21,8 +20,8 @@ export const Logo: React.FC = ({ target = '_self', wrapper, onClick, + compact, }) => { - const {compact} = useAsideHeaderContext(); const hasWrapper = typeof wrapper === 'function'; let buttonIcon;