MCPcopy Create free account
hub / github.com/ElemeFE/element-react / render

Method render

src/tooltip/Tooltip.jsx:76–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74 }
75
76 render(): React.DOM {
77 const { effect, content, disabled, transition, visibleArrow } = this.props;
78
79 return (
80 <div style={this.style()} className={this.className('el-tooltip')} onMouseEnter={this.showPopper.bind(this)} onMouseLeave={this.hidePopper.bind(this)}>
81 <div ref="reference" className="el-tooltip__rel">
82 <div>{ this.props.children }</div>
83 </div>
84 {
85 !disabled && (
86 <Transition name={transition} onEnter={this.onEnter.bind(this)} onAfterLeave={this.onAfterLeave.bind(this)}>
87 <View show={this.state.showPopper} >
88 <div ref="popper" className={ this.classNames("el-tooltip__popper", `is-${effect}`) }>
89 <div>{ content }</div>
90 { visibleArrow && <div ref="arrow" className="popper__arrow"/> }
91 </div>
92 </View>
93 </Transition>
94 )
95 }
96 </div>
97 )
98 }
99}
100
101Tooltip.propTypes = {

Callers

nothing calls this directly

Calls 3

styleMethod · 0.80
classNameMethod · 0.80
classNamesMethod · 0.80

Tested by

no test coverage detected