Guest User

Untitled

a guest
Apr 23rd, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. import React from 'react';
  2. import {Component} from 'react';
  3. import {Tooltip} from 'react-tippy';
  4.  
  5. import './Thumbnail.css'
  6.  
  7. class Thumbnail extends Component {
  8. constructor(props) {
  9. super(props);
  10. }
  11.  
  12. render() {
  13.  
  14. return (
  15.  
  16. console.log(this.props.textures),
  17. console.log(this.props.activeThumbnails ),
  18.  
  19. <div onClick={() => this.props.pickTextures(this.props.textures)}
  20. className={this.props.activeThumbnails .some(thumbnail => thumbnail === this.props.textures) ? "button is-primary thumbnail" : "button thumbnail"}>
  21. <Tooltip title={this.props.textureName}>
  22. <span>
  23. <figure className={"image is-32x32"}>
  24. <img src={this.props.textures.urlImage}/>
  25. </figure>
  26. </span>
  27. </Tooltip>
  28. </div>
  29. );
  30.  
  31. }
  32. }
  33.  
  34. export default Thumbnail;
Add Comment
Please, Sign In to add comment