File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -68,10 +68,10 @@ module.exports = React.createClass( {
68
68
69
69
getHorizontalAlign ( ) {
70
70
if ( this . props . align === 'left' ) {
71
- return 'right ' ;
71
+ return 'left ' ;
72
72
}
73
73
else if ( this . props . align === 'right' ) {
74
- return 'left ' ;
74
+ return 'right ' ;
75
75
}
76
76
return 'center' ;
77
77
} ,
@@ -92,11 +92,12 @@ module.exports = React.createClass( {
92
92
'slds-popover--tooltip' :true ,
93
93
'slds-nubbin--top' :this . props . align === 'bottom' ,
94
94
'slds-nubbin--bottom' :this . props . align === 'top' ,
95
- 'slds-nubbin--left' :this . props . align === 'left ' ,
96
- 'slds-nubbin--right' :this . props . align === 'right '
95
+ 'slds-nubbin--left' :this . props . align === 'right ' ,
96
+ 'slds-nubbin--right' :this . props . align === 'left '
97
97
} ;
98
98
99
99
return this . state . isOpen ?< SLDSPopover
100
+ key = { this . getHorizontalAlign ( ) + ' ' + this . getVerticalAlign ( ) }
100
101
targetElement = { this . refs . tooltipTarget }
101
102
closeOnTabKey = { true }
102
103
className = ''
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import {SLDSTooltip,SLDSButton} from '../../../components';
14
14
15
15
import { default as PrismCode } from 'react-prism/lib/PrismCode' ;
16
16
17
- const alignNames = [ 'left' , 'right ' , 'top ' , 'bottom' ] ;
17
+ const alignNames = [ 'left' , 'top ' , 'right ' , 'bottom' ] ;
18
18
19
19
module . exports = React . createClass ( {
20
20
@@ -31,7 +31,7 @@ module.exports = React.createClass( {
31
31
componentDidMount ( ) {
32
32
setInterval ( ( ) => {
33
33
this . nextAlign ( ) ;
34
- } , 2000 ) ;
34
+ } , 300 ) ;
35
35
} ,
36
36
37
37
handleOnUpdateHighlighted ( ) {
@@ -71,7 +71,6 @@ module.exports = React.createClass( {
71
71
< div className = "slds-p-vertical--large" >
72
72
< p >
73
73
< SLDSTooltip
74
- key = { 'align_' + this . state . alignIndex }
75
74
content = { < span > Tooltip with top alignment</ span > }
76
75
align = { alignNames [ this . state . alignIndex ] } >
77
76
Tooltip align top
@@ -80,7 +79,7 @@ module.exports = React.createClass( {
80
79
</ div >
81
80
82
81
< div ref = "super" className = "slds-p-vertical--large" >
83
- < p >
82
+ < p style = { { marginTop : '5rem' } } >
84
83
< SLDSTooltip
85
84
content = { < span > Tooltip with bottom alignment</ span > }
86
85
align = 'bottom'
You can’t perform that action at this time.
0 commit comments