import React, { FunctionComponent } from 'react'; import { Icon28ChevronBack, Icon28ChevronLeftOutline, Icon28ArrowLeftOutline } from '@vkontakte/icons'; import PanelHeaderButton, { PanelHeaderButtonProps } from '../PanelHeaderButton/PanelHeaderButton'; import { ANDROID, VKCOM, IOS } from '../../lib/platform'; import { usePlatform } from '../../hooks/usePlatform'; import { withAdaptivity, SizeType } from '../../hoc/withAdaptivity'; import { AdaptivityProps } from '../..'; import { getClassName } from '../../helpers/getClassName'; import { classNames } from '../../lib/classNames'; const PanelHeaderBack: FunctionComponent = ({ label, sizeX, ...props }: PanelHeaderButtonProps & AdaptivityProps) => { const platform = usePlatform(); const showLabel = platform === VKCOM || platform === IOS && sizeX === SizeType.REGULAR; const className = classNames(getClassName('PanelHeaderBack', platform), props.className, { 'PanelHeaderBack--has-label': showLabel && !!label, }); return ( {platform === ANDROID ? : platform === VKCOM ? : } ); }; export default React.memo(withAdaptivity(PanelHeaderBack, { sizeX: true, }));