()
| 217 | } |
| 218 | |
| 219 | render(): React.DOM { |
| 220 | const { height, arrow, indicatorPosition } = this.props; |
| 221 | const { hover, activeIndex, items } = this.state; |
| 222 | return ( |
| 223 | <div |
| 224 | ref="root" |
| 225 | className={this.className('el-carousel', { 'el-carousel--card': this.iscard })} |
| 226 | onMouseEnter={this.handleMouseEnter.bind(this)} |
| 227 | onMouseLeave={this.handleMouseLeave.bind(this)} |
| 228 | > |
| 229 | <div |
| 230 | className="el-carousel__container" |
| 231 | style={{height: height}}> |
| 232 | <Transition name="carousel-arrow-left"> |
| 233 | { |
| 234 | arrow !== 'never' && ( |
| 235 | <View show={arrow === 'always' || hover}> |
| 236 | <button |
| 237 | className="el-carousel__arrow el-carousel__arrow--left" |
| 238 | onMouseEnter={this.handleButtonEnter.bind(this, 'left')} |
| 239 | onMouseLeave={this.handleButtonLeave.bind(this)} |
| 240 | onClick={this.throttledArrowClick.bind(this, activeIndex - 1)} |
| 241 | > |
| 242 | <i className="el-icon-arrow-left"></i> |
| 243 | </button> |
| 244 | </View> |
| 245 | ) |
| 246 | } |
| 247 | </Transition> |
| 248 | <Transition name="carousel-arrow-right"> |
| 249 | { |
| 250 | arrow !== 'never' && ( |
| 251 | <View show={arrow === 'always' || hover}> |
| 252 | <button |
| 253 | className="el-carousel__arrow el-carousel__arrow--right" |
| 254 | onMouseEnter={this.handleButtonEnter.bind(this, 'right')} |
| 255 | onMouseLeave={this.handleButtonLeave.bind(this)} |
| 256 | onClick={this.throttledArrowClick.bind(this, activeIndex + 1)} |
| 257 | > |
| 258 | <i className="el-icon-arrow-right"></i> |
| 259 | </button> |
| 260 | </View> |
| 261 | ) |
| 262 | } |
| 263 | </Transition> |
| 264 | {this.props.children} |
| 265 | </div> |
| 266 | { |
| 267 | indicatorPosition !== 'none' && ( |
| 268 | <ul |
| 269 | className={this.classNames('el-carousel__indicators', { |
| 270 | 'el-carousel__indicators--outside': indicatorPosition === 'outside' || this.iscard |
| 271 | })} |
| 272 | > |
| 273 | { |
| 274 | items.map((item, index) => { |
| 275 | return ( |
| 276 | <li |
nothing calls this directly
no test coverage detected