mirror of
				https://github.com/vector-im/element-web.git
				synced 2025-11-04 02:02:14 +01:00 
			
		
		
		
	Allow custom classes
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
		
							parent
							
								
									f1e780e642
								
							
						
					
					
						commit
						795dfa7206
					
				@ -24,6 +24,7 @@ import {replaceableComponent} from "../../../utils/replaceableComponent";
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
interface ITooltipProps {
 | 
					interface ITooltipProps {
 | 
				
			||||||
    tooltip?: React.ReactNode;
 | 
					    tooltip?: React.ReactNode;
 | 
				
			||||||
 | 
					    className?: string,
 | 
				
			||||||
    tooltipClassName?: string;
 | 
					    tooltipClassName?: string;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -53,7 +54,7 @@ export default class InfoTooltip extends React.PureComponent<ITooltipProps, ISta
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    render() {
 | 
					    render() {
 | 
				
			||||||
        const {tooltip, children, tooltipClassName} = this.props;
 | 
					        const {tooltip, children, tooltipClassName, className} = this.props;
 | 
				
			||||||
        const title = _t("Information");
 | 
					        const title = _t("Information");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Tooltip are forced on the right for a more natural feel to them on info icons
 | 
					        // 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}
 | 
					            alignment={Alignment.Right}
 | 
				
			||||||
        /> : <div />;
 | 
					        /> : <div />;
 | 
				
			||||||
        return (
 | 
					        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} />
 | 
					                <span className="mx_InfoTooltip_icon" aria-label={title} />
 | 
				
			||||||
                {children}
 | 
					                {children}
 | 
				
			||||||
                {tip}
 | 
					                {tip}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user