diff --git a/ts/components/InContactsIcon.tsx b/ts/components/InContactsIcon.tsx index 73a1f73bec..7d6f174f16 100644 --- a/ts/components/InContactsIcon.tsx +++ b/ts/components/InContactsIcon.tsx @@ -9,15 +9,26 @@ import { LocalizerType } from '../types/Util'; type PropsType = { className?: string; + tooltipContainerRef?: React.RefObject; i18n: LocalizerType; }; export const InContactsIcon = (props: PropsType): JSX.Element => { - const { className, i18n } = props; + const { className, i18n, tooltipContainerRef } = props; /* eslint-disable jsx-a11y/no-noninteractive-tabindex */ return ( - + ( )); +story.add('With Applied Popper Modifiers', () => { + return ( + + {Trigger} + + ); +}); + story.add('Dark Theme', () => ( ; sticky?: boolean; theme?: Theme; }; @@ -81,6 +83,7 @@ export const Tooltip: React.FC = ({ direction, sticky, theme, + popperModifiers = [], }) => { const [isHovering, setIsHovering] = React.useState(false); @@ -99,7 +102,10 @@ export const Tooltip: React.FC = ({ )} - + {({ arrowProps, placement, ref, style }) => showTooltip && (
{ // eslint-disable-next-line @typescript-eslint/no-explicit-any private menuTriggerRef: React.RefObject; + public headerRef: React.RefObject; + public constructor(props: PropsType) { super(props); this.state = { isNarrow: false, modalState: ModalState.NothingOpen }; this.menuTriggerRef = React.createRef(); + this.headerRef = React.createRef(); this.showMenuBound = this.showMenu.bind(this); } @@ -163,6 +166,7 @@ export class ConversationHeader extends React.Component { ) : null}
@@ -596,7 +600,11 @@ export class ConversationHeader extends React.Component { ); } - return
{contents}
; + return ( +
+ {contents} +
+ ); } public render(): ReactNode { diff --git a/ts/util/lint/exceptions.json b/ts/util/lint/exceptions.json index 3b700951e1..b291132008 100644 --- a/ts/util/lint/exceptions.json +++ b/ts/util/lint/exceptions.json @@ -12792,6 +12792,22 @@ "updated": "2020-05-20T20:10:43.540Z", "reasonDetail": "Used to reference popup menu" }, + { + "rule": "React-createRef", + "path": "ts/components/conversation/ConversationHeader.js", + "line": " this.headerRef = react_1.default.createRef();", + "reasonCategory": "usageTrusted", + "updated": "2021-01-18T22:24:05.937Z", + "reasonDetail": "Used to reference popup menu boundaries element" + }, + { + "rule": "React-createRef", + "path": "ts/components/conversation/ConversationHeader.tsx", + "line": " this.headerRef = React.createRef();", + "reasonCategory": "usageTrusted", + "updated": "2021-01-18T22:24:05.937Z", + "reasonDetail": "Used to reference popup menu boundaries element" + }, { "rule": "React-useRef", "path": "ts/components/conversation/ConversationHero.tsx",