Skip to content

Commit

Permalink
Merge fd4c57a into 582e804
Browse files Browse the repository at this point in the history
  • Loading branch information
olamothe committed Mar 27, 2017
2 parents 582e804 + fd4c57a commit 6059775
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sass/_CardOverlay.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,13 @@
cursor: pointer;
flex-shrink: 0;
}

.CoveoResult.coveo-with-card-overlay {
@include transition(min-height .5s);
min-height: 0;
}

.CoveoResult.coveo-card-overlay-opened {
min-height: 180px;
}

3 changes: 3 additions & 0 deletions src/ui/CardOverlay/CardOverlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export class CardOverlay extends Component {

this.parentCard = $$(this.element).closest('.CoveoResult');
Assert.exists(this.parentCard);
$$(this.parentCard).addClass('coveo-with-card-overlay');
this.createOverlay();
this.createButton(this.element);
this.closeOverlay();
Expand Down Expand Up @@ -91,6 +92,7 @@ export class CardOverlay extends Component {
public openOverlay() {
$$(this.overlay).removeClass('coveo-hidden-for-tab-nav');
$$(this.overlay).addClass('coveo-opened');
$$(this.parentCard).addClass('coveo-card-overlay-opened');
this.bind.trigger(this.element, CardOverlayEvents.openCardOverlay);
}

Expand All @@ -102,6 +104,7 @@ export class CardOverlay extends Component {
public closeOverlay() {
$$(this.overlay).addClass('coveo-hidden-for-tab-nav');
$$(this.overlay).removeClass('coveo-opened');
$$(this.parentCard).removeClass('coveo-card-overlay-opened');
this.bind.trigger(this.element, CardOverlayEvents.closeCardOverlay);
}

Expand Down

0 comments on commit 6059775

Please sign in to comment.