Improve tooltip positioning
Signed-off-by: Michael Weimann <michaelw@matrix.org>
This commit is contained in:
parent
1e73184b78
commit
7ed3089434
16 changed files with 112 additions and 68 deletions
|
@ -26,7 +26,6 @@ interface IProps extends React.ComponentProps<typeof AccessibleButton> {
|
|||
label?: string;
|
||||
tooltipClassName?: string;
|
||||
forceHide?: boolean;
|
||||
yOffset?: number;
|
||||
alignment?: Alignment;
|
||||
onHover?: (hovering: boolean) => void;
|
||||
onHideTooltip?(ev: SyntheticEvent): void;
|
||||
|
@ -76,13 +75,12 @@ export default class AccessibleTooltipButton extends React.PureComponent<IProps,
|
|||
|
||||
render() {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const { title, tooltip, children, tooltipClassName, forceHide, yOffset, alignment, onHideTooltip,
|
||||
const { title, tooltip, children, tooltipClassName, forceHide, alignment, onHideTooltip,
|
||||
...props } = this.props;
|
||||
|
||||
const tip = this.state.hover && <Tooltip
|
||||
tooltipClassName={tooltipClassName}
|
||||
label={tooltip || title}
|
||||
yOffset={yOffset}
|
||||
alignment={alignment}
|
||||
/>;
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue