Web:Common: enable add button when navigation is open

This commit is contained in:
Timofey Boyko 2022-03-10 14:00:15 +03:00
parent b572b84410
commit eb11e51576
2 changed files with 11 additions and 5 deletions

View File

@ -15,13 +15,17 @@ const StyledContainer = styled.div`
margin-right: 12px; margin-right: 12px;
min-width: 17px; min-width: 17px;
@media ${tablet} { ${(props) =>
display: none; !props.isDropBox &&
} css`
@media ${tablet} {
display: none;
}
`}
${isMobile && ${isMobile &&
css` css`
display: none; ${(props) => !props.isDropBox && "display: none"};
`} `}
} }
@ -37,6 +41,7 @@ const StyledContainer = styled.div`
const ControlButtons = ({ const ControlButtons = ({
personal, personal,
isDropBox,
isRootFolder, isRootFolder,
canCreate, canCreate,
getContextOptionsFolder, getContextOptionsFolder,
@ -46,7 +51,7 @@ const ControlButtons = ({
clearTrash, clearTrash,
}) => { }) => {
return ( return (
<StyledContainer> <StyledContainer isDropBox={isDropBox}>
{!isRootFolder && canCreate ? ( {!isRootFolder && canCreate ? (
<> <>
<ContextMenuButton <ContextMenuButton

View File

@ -131,6 +131,7 @@ const DropBox = React.forwardRef(
<ControlButtons <ControlButtons
personal={personal} personal={personal}
isRootFolder={isRootFolder} isRootFolder={isRootFolder}
isDropBox={true}
canCreate={canCreate} canCreate={canCreate}
getContextOptionsFolder={getContextOptionsFolder} getContextOptionsFolder={getContextOptionsFolder}
getContextOptionsPlus={getContextOptionsPlus} getContextOptionsPlus={getContextOptionsPlus}