|
|
@ -27,19 +27,19 @@ const StyledCountContainer = styled.div<{ shouldRender: boolean }>`
|
|
|
|
|
|
|
|
|
|
|
|
const StyledCount = styled.div`
|
|
|
|
const StyledCount = styled.div`
|
|
|
|
position: relative;
|
|
|
|
position: relative;
|
|
|
|
font-size: 0.6em;
|
|
|
|
font-size: 0.6rem;
|
|
|
|
`;
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
|
|
export const SessionNotificationCount = (props: Props) => {
|
|
|
|
export const SessionNotificationCount = (props: Props) => {
|
|
|
|
const { count } = props;
|
|
|
|
const { count } = props;
|
|
|
|
const overflow = Boolean(count && count > 9);
|
|
|
|
const overflow = Boolean(count && count > 99);
|
|
|
|
const shouldRender = Boolean(count && count > 0);
|
|
|
|
const shouldRender = Boolean(count && count > 0);
|
|
|
|
|
|
|
|
|
|
|
|
if (overflow) {
|
|
|
|
if (overflow) {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<StyledCountContainer shouldRender={shouldRender}>
|
|
|
|
<StyledCountContainer shouldRender={shouldRender}>
|
|
|
|
<StyledCount>
|
|
|
|
<StyledCount>
|
|
|
|
{9}
|
|
|
|
{99}
|
|
|
|
<span>+</span>
|
|
|
|
<span>+</span>
|
|
|
|
</StyledCount>
|
|
|
|
</StyledCount>
|
|
|
|
</StyledCountContainer>
|
|
|
|
</StyledCountContainer>
|
|
|
|