Skip to content

Commit

Permalink
Upgrade to use ember-css-transitions instead of animate mixin. This d…
Browse files Browse the repository at this point in the history
…oes no longer depend on adopted-ember-addons#138.
  • Loading branch information
peec authored and bj-mcduck committed Apr 28, 2016
1 parent a175f14 commit 50f5087
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 47 deletions.
8 changes: 5 additions & 3 deletions addon/components/paper-toast.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import Ember from 'ember';
import AnimateMixin from 'ember-paper/mixins/animate-mixin';
import TransitionMixin from 'ember-css-transitions/mixins/transition-mixin';

/*global Hammer*/

export default Ember.Component.extend(AnimateMixin, {
export default Ember.Component.extend(TransitionMixin, {
tagName: 'md-toast',
classNames: ['md-default-theme'],
classNameBindings: ['_right:md-right', '_left:md-left', '_bottom:md-bottom', '_top:md-top'],
animated: true,

'align-fab': true,

transitionClass: 'ng',

// right,left,bottom and top should only be given once. Therefor we use a computed for each so that they can
// never change once initially provided.
_right: Ember.computed(function () { return this.get('right'); }),
Expand Down
41 changes: 0 additions & 41 deletions addon/mixins/animate-mixin.js

This file was deleted.

6 changes: 3 additions & 3 deletions tests/dummy/app/templates/toast.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<span>Toasts</span>
</h2>
{{/paper-toolbar}}
{{#paper-content classNames="md-padding"}}
{{#paper-content class="md-padding"}}
<div class="doc-content" style="min-height: 448px; position: relative; overflow: hidden;">
<h3>Basic Usage</h3>
<p>Toast can be dismissed with a swipe, a timer, or a button.</p>
{{#paper-button classNames="md-fab md-fab-top-right"}}FAB{{/paper-button}}
{{#paper-button class="md-fab md-fab-top-right"}}FAB{{/paper-button}}

<!-- some toasts -->

Expand Down Expand Up @@ -76,7 +76,7 @@
{{#paper-checkbox checked=top}}Top{{/paper-checkbox}}


{{#paper-button action="openFabBottom" primary=true classNames="md-fab md-fab-bottom-right"}}FAB{{/paper-button}}
{{#paper-button action="openFabBottom" primary=true class="md-fab md-fab-bottom-right"}}FAB{{/paper-button}}



Expand Down

0 comments on commit 50f5087

Please sign in to comment.