Shared: Navigation: fix trash warning position

This commit is contained in:
Viktor Fomin 2024-02-02 14:35:43 +03:00
parent 2e66a739bf
commit 5823c18b73
3 changed files with 7 additions and 5 deletions

View File

@ -10,7 +10,6 @@ import ArrowButton from "./sub-components/ArrowBtn";
import Text from "./sub-components/Text";
import ControlButtons from "./sub-components/ControlBtn";
import ToggleInfoPanelButton from "./sub-components/ToggleInfoPanelBtn";
import TrashWarning from "./sub-components/TrashWarning";
import NavigationLogo from "./sub-components/LogoBlock";
import DropBox from "./sub-components/DropBox";
@ -261,11 +260,9 @@ const Navigation = ({
onNavigationButtonClick={onNavigationButtonClick}
tariffBar={tariffBar}
title={title}
isEmptyPage={isEmptyPage}
/>
</StyledContainer>
{isDesktop && isTrashFolder && !isEmptyPage && (
<TrashWarning title={titles.trashWarning} />
)}
{infoPanelIsVisible && !hideInfoPanel && (
<ToggleInfoPanelButton
id="info-panel-toggle--open"

View File

@ -64,6 +64,7 @@ export interface IControlButtonProps {
onNavigationButtonClick?: () => void;
tariffBar?: React.ReactNode;
title?: string;
isEmptyPage?: boolean;
}
export interface ITextProps {

View File

@ -9,6 +9,7 @@ import { IControlButtonProps } from "../Navigation.types";
import ToggleInfoPanelButton from "./ToggleInfoPanelBtn";
import PlusButton from "./PlusBtn";
import ContextButton from "./ContextBtn";
import TrashWarning from "./TrashWarning";
import { Button, ButtonSize } from "../../button";
import { isTablet } from "../../../utils";
@ -33,6 +34,7 @@ const ControlButtons = ({
onNavigationButtonClick,
tariffBar,
title,
isEmptyPage,
}: IControlButtonProps) => {
const toggleInfoPanelAction = () => {
toggleInfoPanel?.();
@ -144,7 +146,9 @@ const ControlButtons = ({
)}
</>
)}
{isDesktop && isTrashFolder && !isEmptyPage && (
<TrashWarning title={titles?.trashWarning} />
)}
{navigationButtonLabel && !isTabletView && navigationButtonBlock}
<StyledTariffWrapper>{children && children}</StyledTariffWrapper>
{navigationButtonLabel && isTabletView && navigationButtonBlock}