Web: Components: renamed isButton to withMenu
This commit is contained in:
parent
4d16297132
commit
0cae2ba912
@ -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}
|
||||
/>
|
||||
);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user