Skip to content

Commit

Permalink
fix(mdc-top-app-bar): Use variant specific foundation according to ma…
Browse files Browse the repository at this point in the history
…terial-web-components@0.33.0
  • Loading branch information
pgbross authored and pgbross committed Mar 20, 2018
1 parent 40e6caa commit a51ada8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions components/top-app-bar/mdc-top-app-bar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

<script>
import MDCTopAppBarFoundation from '@material/top-app-bar/foundation';
import MDCShortTopAppBarFoundation from '@material/top-app-bar/short/foundation';
import * as util from '@material/top-app-bar/util';
import { DispatchEventMixin, emitCustomEvent } from '../base';
Expand Down Expand Up @@ -41,7 +42,7 @@ export default {
},
mixins: [DispatchEventMixin],
mounted() {
this.foundation = new MDCTopAppBarFoundation({
const adapter = {
addClass: className => {
this.$set(this.rootClasses, className, true);
},
Expand Down Expand Up @@ -83,7 +84,12 @@ export default {
this.$refs.root.querySelectorAll(
MDCTopAppBarFoundation.strings.ACTION_ITEM_SELECTOR,
).length,
});
};
this.foundation = this.short
? new MDCShortTopAppBarFoundation(adapter)
: new MDCTopAppBarFoundation(adapter);
this.foundation.init();
},
computed: {
Expand Down

0 comments on commit a51ada8

Please sign in to comment.