diff --git a/README.md b/README.md index 1b911dc55..0022254b4 100644 --- a/README.md +++ b/README.md @@ -97,11 +97,10 @@ Check the example [React-tooltip Test](https://react-tooltip.netlify.com/) > Hide the tooltip manually, the target is optional, if no target passed in, all existing tooltips will be hidden ```js -import {findDOMNode} from 'react-dom' import ReactTooltip from 'react-tooltip' -
- +this.fooRef = ref} data-tip='tooltip'>
+this.fooRef = ref} data-tip='tooltip'>
+{" σ`∀´)σ \n" +
" (〃∀〃) \n" +
" This is a global react component tooltip You can put every thing here This is a global react component tooltip You can put every thing here\n" +
- " " + " " + "
\n" +
+ " \n" +
+ " " + " " + "
\n" +
"
@@ -193,30 +193,30 @@ class Test extends React.Component {{"( •̀д•́)\n" + - "
+ ""} "} {"( •̀д•́)\n" + - "
+ ""} "}
@@ -238,13 +238,13 @@ class Test extends React.Component {{"(・ω´・ )́)\n" + - "
+ "}"}\n" + - ".extraClass {\n" + + " \n" + + ".extraClass {\n" + " font-size: 20px !important;\n" + " pointer-events: auto !important;\n" + " &:hover {\n" + - "visibility: visible !important;\n" + - "opacity: 1 !important;\n" + + "visibility: visible !important;\n" + + "opacity: 1 !important;\n" + " }\n" + - "}"} {"(・ω´・ )́)\n" + - "
+ "}"}\n" + - " .customeTheme {\n" + + " \n" + + " .customeTheme {\n" + " color: #ff6e00 !important;\n" + " background-color: orange !important;\n" + " &.place-top {\n" + - " &:after {\n" + - " border-top-color: orange !important;\n" + - " border-top-style: solid !important;\n" + - " border-top-width: 6px !important;\n" + - " }\n" + + " &:after {\n" + + " border-top-color: orange !important;\n" + + " border-top-style: solid !important;\n" + + " border-top-width: 6px !important;\n" + + " }\n" + " }\n" + - "}"}
@@ -264,8 +264,8 @@ class Test extends React.Component {{"=( •̀д•́)\n" + - "
+ "Math.floor(Math.random() * 100)} />"} Math.floor(Math.random() * 100)} />"} {"=( •̀д•́)\n" + - "
+ "{\n" + - " return 'Random length content'.slice(0, Math.floor(Math.random() * 21) + 1)\n" + - "}, 1000]}/>"} {\n" + + " return 'Random length content'.slice(0, Math.floor(Math.random() * 21) + 1)\n" + + "}, 1000]}/>"}
@@ -294,11 +294,11 @@ class Test extends React.Component {
@@ -306,10 +306,10 @@ class Test extends React.Component {{"
...\n" + - "Math.floor(Math.random() * 100)}/>"} + " Math.floor(Math.random() * 100)}/>"} {"
...\n" + - "{return new Date().toISOString()}, 1000]}/>"} + " {return new Date().toISOString()}, 1000]}/>"}
Note: if you dynamically change elements in the SVG, add:
- {" componentDidUpdate() {\n" + - " ReactTooltip.rebuild()\n" + - " }" - } + {" componentDidUpdate() {\n" + + " ReactTooltip.rebuild()\n" + + " }" + }
---+{"\n" + - "
-"} {"\n" + + "
+"}
Notice that the tooltip delays going away so you can get your mouse in it. You must set delayUpdate and delayHide for the tooltip to stay long enough to get your mouse over it.
- -Notice that the tooltip delays going away so you can get your mouse in it. You must set delayUpdate and delayHide for the tooltip to stay long enough to get your mouse over it.
+ +Put mouse here
Put mouse here
+ /> +
@@ -425,7 +425,7 @@ class Test extends React.Component { ""}{"1 (❂‿❂)"}
{"2 (❂‿❂)..."}
{"8 (❂‿❂)"}
{"
+ " getContent={(dataTip) => \n" + + "\n" + - " }\n" + - " effect='solid'\n" + - " delayHide={500}\n" + - " delayShow={500}\n" + - " delayUpdate={500}\n" + - " place={'right'}\n" + - " border={true}\n" + - " type={'light'}"}This little buddy is {dataTip}
Put mouse here
}\n" + + " effect='solid'\n" + + " delayHide={500}\n" + + " delayShow={500}\n" + + " delayUpdate={500}\n" + + " place={'right'}\n" + + " border={true}\n" + + " type={'light'}"}This little buddy is {dataTip}
Put mouse here