MCPcopy Create free account
hub / github.com/flyfloor/react-component / render

Method render

demo/example/TooltipDemo.jsx:5–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3
4export default class TooltipDemo extends React.Component {
5 render() {
6 const contentNode = <p>Some basic component</p>;
7 return (
8 <div>
9 <h3>Tooltip</h3>
10 <ol>
11 <li>
12 <h4>Default tooltip</h4>
13 <Tooltip content={<p>Some component,build with ReactJs</p>}>
14 <button>hover</button>
15 </Tooltip>
16 <pre>
17 <code>
18{`
19<Tooltip content={<p>Some component,build with ReactJs</p>}>
20 <button>hover</button>
21</Tooltip>
22`}
23 </code>
24 </pre>
25 </li>
26 <li>
27 <h4>Tooltip with different position</h4>
28 <ul>
29 <li>
30 <Tooltip content={<h2>huge text</h2>} position='left'>
31 <div style={{'border': '1px solid #eee', 'padding': '20px', 'background': '#f8f8f8'}}>
32 <h3>hover to show tooltip at left</h3>
33 <p>this is the content</p>
34 </div>
35 </Tooltip>
36 <pre>
37 <code>
38{`
39<Tooltip content={<h2>huge text</h2>} position='left'>
40 ...
41</Tooltip>
42`}
43 </code>
44 </pre>
45 </li>
46 <li>
47 <Tooltip content={contentNode} position='right'>
48 <button>hover</button>
49 </Tooltip>
50 <pre>
51 <code>
52{`
53<Tooltip content={<h2>huge text</h2>} position='right'>
54 ...
55</Tooltip>
56`}
57 </code>
58 </pre>
59 </li>
60 <li>
61 <Tooltip content={contentNode} position='top'>
62 <button>hover</button>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected