import Tippy from '@tippyjs/react';
function Tooltip({
- className, placement, content, children,
+ className, placement, content, delay, children,
}) {
return (
<Tippy
arrow={false}
maxWidth={250}
placement={placement}
- delay={[0, 0]}
+ delay={delay}
duration={[100, 0]}
>
{children}
Tooltip.defaultProps = {
placement: 'top',
className: '',
+ delay: [200, 0],
};
Tooltip.propTypes = {
className: PropTypes.string,
placement: PropTypes.string,
content: PropTypes.node.isRequired,
+ delay: PropTypes.arrayOf(PropTypes.number),
children: PropTypes.node.isRequired,
};
margin: 0 !important;
}
+ & .avatar-container,
+ & .notification-badge {
+ transition: transform 200ms cubic-bezier(0, 0.8, 0.67, 0.97);
+ }
+ &:hover .avatar-container {
+ transform: translateX(4px)
+ }
+ &:hover .notification-badge {
+ transform: translate(calc(20% + 4px), -20%);
+ }
&:focus {
outline: none;
}
width: 3px;
height: 12px;
- background-color: var(--ic-surface-normal);
+ background-color: var(--tc-surface-high);
border-radius: 0 4px 4px 0;
transition: height 200ms linear;
notificationCount={dmsNoti !== null ? abbreviateNumber(dmsNoti.total) : 0}
isAlert={dmsNoti?.highlight > 0}
/>
- <SidebarAvatar onClick={() => openPublicRooms()} tooltip="Public rooms" iconSrc={HashSearchIC} />
</div>
<div className="sidebar-divider" />
<div className="space-container">