|
| 1 | +<template> |
| 2 | + <div> |
| 3 | + <div class="phone-viewport"> |
| 4 | + <md-bottom-bar md-type="shift" :md-theme="'bottom-bar-' + theme"> |
| 5 | + <md-bottom-bar-item md-label="Home" md-icon="home" @click="theme = 'teal'"></md-bottom-bar-item> |
| 6 | + <md-bottom-bar-item md-label="Pages" md-icon="pages" @click="theme = 'orange'"></md-bottom-bar-item> |
| 7 | + <md-bottom-bar-item md-label="Posts" md-icon="assets/icon-whatshot.svg" @click="theme = 'blue'"></md-bottom-bar-item> |
| 8 | + <md-bottom-bar-item md-label="Favorites" md-icon="favorite" @click="theme = 'red'"></md-bottom-bar-item> |
| 9 | + </md-bottom-bar> |
| 10 | + </div> |
| 11 | + </div> |
| 12 | +</template> |
| 13 | + |
| 14 | +<script> |
| 15 | +export default { |
| 16 | + name: 'ChangingThemes', |
| 17 | + data: () => ({ |
| 18 | + theme: 'teal' |
| 19 | + }) |
| 20 | +} |
| 21 | +</script> |
| 22 | + |
| 23 | +<style lang="scss"> |
| 24 | + @import "~vue-material/theme/factory"; |
| 25 | +
|
| 26 | + @include md-register-theme("bottom-bar-teal", ( |
| 27 | + primary: md-get-palette-color(teal, A200) |
| 28 | + )); |
| 29 | +
|
| 30 | + @include md-register-theme("bottom-bar-orange", ( |
| 31 | + primary: md-get-palette-color(orange, A200) |
| 32 | + )); |
| 33 | +
|
| 34 | + @include md-register-theme("bottom-bar-blue", ( |
| 35 | + primary: md-get-palette-color(blue, A200), |
| 36 | + accent: md-get-palette-color(red, A200) |
| 37 | + )); |
| 38 | +
|
| 39 | + @include md-register-theme("bottom-bar-red", ( |
| 40 | + primary: md-get-palette-color(red, A200) |
| 41 | + )); |
| 42 | +
|
| 43 | + @import "~vue-material/theme/all"; |
| 44 | +</style> |
| 45 | + |
| 46 | +<style lang="scss" scoped> |
| 47 | + .phone-viewport { |
| 48 | + width: 322px; |
| 49 | + height: 200px; |
| 50 | + display: inline-flex; |
| 51 | + align-items: flex-end; |
| 52 | + overflow: hidden; |
| 53 | + border: 1px solid rgba(#000, .26); |
| 54 | + background: rgba(#000, .06); |
| 55 | + } |
| 56 | +</style> |
0 commit comments