Skip to content

Commit

Permalink
Set tile classes separately
Browse files Browse the repository at this point in the history
  • Loading branch information
inukshuk committed Feb 3, 2017
1 parent ceae327 commit 552e050
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/components/item/tile.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ class ItemTile extends Component {

get classes() {
return {
'item-tile': true,
'active': this.props.isSelected,
'dragging': this.props.isDragging,
'over': this.props.isOver && this.props.canDrop
item: true,
tile: true,
active: this.props.isSelected,
dragging: this.props.isDragging,
over: this.props.isOver && this.props.canDrop
}
}

Expand Down
6 changes: 6 additions & 0 deletions src/components/photo/tile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ const cn = require('classnames')

class PhotoTile extends PhotoIterable {

get classes() {
return {
...super.classes, tile: true
}
}

get style() {
const height = `${this.props.size * 1.25}px`

Expand Down

0 comments on commit 552e050

Please sign in to comment.