Web: Components: renamed isButton to withMenu

This commit is contained in:
Nikita Gopienko 2022-09-12 18:09:53 +03:00
parent 4d16297132
commit 0cae2ba912
2 changed files with 8 additions and 4 deletions

View File

@ -46,7 +46,7 @@ const MobileView = ({
secondaryProgressDataStoreCurrentFile,
secondaryProgressDataStoreCurrentFilesCount,
clearSecondaryProgressData,
isButton,
withMenu,
onMainButtonClick,
}) => {
const [isOpenButton, setIsOpenButton] = React.useState(false);
@ -161,7 +161,7 @@ const MobileView = ({
title={titleProp}
withoutButton={isRooms}
alert={primaryProgressDataAlert}
isButton={isRooms}
withMenu={!isRooms}
onClick={onMainButtonClick}
/>
);

View File

@ -116,7 +116,7 @@ const MainButtonMobile = (props) => {
onClose,
sectionWidth,
alert,
isButton,
withMenu,
onClick,
} = props;
@ -210,7 +210,7 @@ const MainButtonMobile = (props) => {
};
const onMainButtonClick = (e) => {
if (isButton) {
if (!withMenu) {
onClick && onClick(e);
return;
}
@ -432,4 +432,8 @@ MainButtonMobile.propTypes = {
onClose: PropTypes.func,
};
MainButtonMobile.defaultProps = {
withMenu: true,
};
export default MainButtonMobile;