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 committed Aug 18, 2015
1 parent 33f9101 commit caa6ae3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 48 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.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@
},
"dependencies": {
"broccoli-autoprefixer": "^3.0.0",
"ember-cli-babel": "^5.1.3"
"ember-cli-babel": "^5.1.3",
"ember-css-transitions": "^0.1.0",
"ember-wormhole": "^0.3.4"
},
"keywords": [
"ember-addon",
Expand Down
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 caa6ae3

Please sign in to comment.