@@ -2,17 +2,21 @@ import React from 'react';
2
2
import PropTypes from 'prop-types' ;
3
3
import Octicon from '../atom/octicon' ;
4
4
5
+ import RefHolder from '../models/ref-holder' ;
6
+ import Tooltip from '../atom/tooltip' ;
5
7
import { addEvent } from '../reporter-proxy' ;
6
8
import { autobind } from '../helpers' ;
7
9
8
10
export default class GithubTileView extends React . Component {
9
11
static propTypes = {
10
12
didClick : PropTypes . func . isRequired ,
13
+ tooltips : PropTypes . object . isRequired
11
14
}
12
15
13
16
constructor ( props ) {
14
17
super ( props ) ;
15
18
autobind ( this , 'handleClick' ) ;
19
+ this . refTileNode = new RefHolder ( ) ;
16
20
}
17
21
18
22
handleClick ( ) {
@@ -22,12 +26,22 @@ export default class GithubTileView extends React.Component {
22
26
23
27
render ( ) {
24
28
return (
25
- < button
26
- className = "github-StatusBarTile inline-block"
27
- onClick = { this . handleClick } >
28
- < Octicon icon = "mark-github" />
29
- GitHub
30
- </ button >
29
+ < span ref = { this . refTileNode . setter } >
30
+ < button
31
+ className = "github-StatusBarTile inline-block"
32
+ onClick = { this . handleClick } >
33
+ < Octicon icon = "mark-github" />
34
+ GitHub
35
+ </ button >
36
+ < Tooltip
37
+ key = "tooltip"
38
+ manager = { this . props . tooltips }
39
+ target = { this . refTileNode }
40
+ title = { `<div style="text-align: left; line-height: 1.2em;">${ 'hi' } </div>` }
41
+ showDelay = { atom . tooltips . hoverDefaults . delay . show }
42
+ hideDelay = { atom . tooltips . hoverDefaults . delay . hide }
43
+ />
44
+ </ span >
31
45
) ;
32
46
}
33
47
}
0 commit comments