Improve Tooltip font/layout consistency
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
b6cd8065f8
commit
d5f2d43429
7 changed files with 28 additions and 26 deletions
|
@ -24,6 +24,7 @@ import Tooltip from './Tooltip';
|
|||
|
||||
interface ITooltipProps extends IProps {
|
||||
title: string;
|
||||
tooltip?: React.ReactNode;
|
||||
tooltipClassName?: string;
|
||||
}
|
||||
|
||||
|
@ -52,7 +53,7 @@ export default class AccessibleTooltipButton extends React.PureComponent<IToolti
|
|||
};
|
||||
|
||||
render() {
|
||||
const {title, children, ...props} = this.props;
|
||||
const {title, tooltip, children, ...props} = this.props;
|
||||
const tooltipClassName = classnames(
|
||||
"mx_AccessibleTooltipButton_tooltip",
|
||||
this.props.tooltipClassName,
|
||||
|
@ -61,7 +62,7 @@ export default class AccessibleTooltipButton extends React.PureComponent<IToolti
|
|||
const tip = this.state.hover ? <Tooltip
|
||||
className="mx_AccessibleTooltipButton_container"
|
||||
tooltipClassName={tooltipClassName}
|
||||
label={title}
|
||||
label={tooltip || title}
|
||||
/> : <div />;
|
||||
return (
|
||||
<AccessibleButton {...props} onMouseOver={this.onMouseOver} onMouseOut={this.onMouseOut} aria-label={title}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue