mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 11:47:23 +03:00
Allow custom classes
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
f1e780e642
commit
795dfa7206
1 changed files with 7 additions and 2 deletions
|
@ -24,6 +24,7 @@ import {replaceableComponent} from "../../../utils/replaceableComponent";
|
|||
|
||||
interface ITooltipProps {
|
||||
tooltip?: React.ReactNode;
|
||||
className?: string,
|
||||
tooltipClassName?: string;
|
||||
}
|
||||
|
||||
|
@ -53,7 +54,7 @@ export default class InfoTooltip extends React.PureComponent<ITooltipProps, ISta
|
|||
};
|
||||
|
||||
render() {
|
||||
const {tooltip, children, tooltipClassName} = this.props;
|
||||
const {tooltip, children, tooltipClassName, className} = this.props;
|
||||
const title = _t("Information");
|
||||
|
||||
// Tooltip are forced on the right for a more natural feel to them on info icons
|
||||
|
@ -64,7 +65,11 @@ export default class InfoTooltip extends React.PureComponent<ITooltipProps, ISta
|
|||
alignment={Alignment.Right}
|
||||
/> : <div />;
|
||||
return (
|
||||
<div onMouseOver={this.onMouseOver} onMouseLeave={this.onMouseLeave} className="mx_InfoTooltip">
|
||||
<div
|
||||
onMouseOver={this.onMouseOver}
|
||||
onMouseLeave={this.onMouseLeave}
|
||||
className={classNames("mx_InfoTooltip", className)}
|
||||
>
|
||||
<span className="mx_InfoTooltip_icon" aria-label={title} />
|
||||
{children}
|
||||
{tip}
|
||||
|
|
Loading…
Reference in a new issue