Explorar el Código

dashfolders: Add className to Tooltip component

Johannes Schill hace 8 años
padre
commit
d9460d0b2b
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      public/app/core/components/Tooltip/withTooltip.tsx

+ 3 - 2
public/app/core/components/Tooltip/withTooltip.tsx

@@ -4,6 +4,7 @@ import { Manager, Popper, Arrow } from 'react-popper';
 interface IwithTooltipProps {
 interface IwithTooltipProps {
   placement?: string;
   placement?: string;
   content: string | ((props: any) => JSX.Element);
   content: string | ((props: any) => JSX.Element);
+  className?: string;
 }
 }
 
 
 export default function withTooltip(WrappedComponent) {
 export default function withTooltip(WrappedComponent) {
@@ -39,10 +40,10 @@ export default function withTooltip(WrappedComponent) {
     }
     }
 
 
     render() {
     render() {
-      const { content } = this.props;
+      const { content, className } = this.props;
 
 
       return (
       return (
-        <Manager className="popper__manager">
+        <Manager className={`popper__manager ${className || ''}`}>
           <WrappedComponent {...this.props} tooltipSetState={this.setState} />
           <WrappedComponent {...this.props} tooltipSetState={this.setState} />
           {this.state.show ? (
           {this.state.show ? (
             <Popper placement={this.state.placement} className="popper">
             <Popper placement={this.state.placement} className="popper">