Web:Components:RoomLogo: update classes
This commit is contained in:
parent
17bcf2e98c
commit
208499be9e
@ -1,6 +1,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { ReactSVG } from "react-svg";
|
import { ReactSVG } from "react-svg";
|
||||||
|
import { isMobile } from "react-device-detect";
|
||||||
|
|
||||||
import { RoomsType } from "@appserver/common/constants";
|
import { RoomsType } from "@appserver/common/constants";
|
||||||
|
|
||||||
@ -55,6 +56,12 @@ const RoomLogo = ({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const onSelect = () => {
|
||||||
|
if (!isMobile) return;
|
||||||
|
|
||||||
|
onChange && onChange();
|
||||||
|
};
|
||||||
|
|
||||||
const icon = getIcon();
|
const icon = getIcon();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -64,6 +71,7 @@ const RoomLogo = ({
|
|||||||
type={type}
|
type={type}
|
||||||
isPrivacy={isPrivacy}
|
isPrivacy={isPrivacy}
|
||||||
isArchive={isArchive}
|
isArchive={isArchive}
|
||||||
|
onClick={onSelect}
|
||||||
>
|
>
|
||||||
<ReactSVG className="room-logo_icon" src={icon} />
|
<ReactSVG className="room-logo_icon" src={icon} />
|
||||||
</StyledLogoContainer>
|
</StyledLogoContainer>
|
||||||
|
@ -94,8 +94,8 @@ const StyledContainer = styled.div`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const StyledLogoContainer = styled.div`
|
const StyledLogoContainer = styled.div`
|
||||||
width: 100%;
|
width: 32px;
|
||||||
height: 100%;
|
height: 32px;
|
||||||
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user