all files / src/appBar/ appBar.vue

100% Statements 0/0
100% Branches 0/0
100% Functions 0/0
100% Lines 0/0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94                                                                                                                                                                                           
<template>
<div class="mu-appbar" :class="['mu-paper-' + zDepth ]">
  <div class="left">
    <slot name="left"></slot>
  </div>
  <div class="mu-appbar-title" :class="titleClass">
    <slot>
      <span>{{title}}</span>
    </slot>
  </div>
  <div class="right">
    <slot name="right"></slot>
  </div>
</div>
</template>
 
<script>
export default {
  name: 'mu-appbar',
  props: {
    title: {
      type: String,
      default: ''
    },
    titleClass: {
      type: [String, Array, Object]
    },
    zDepth: {
      type: Number,
      default: 1
    }
  }
}
</script>
 
<style lang="less">
@import "../styles/import.less";
.mu-appbar {
  display: flex;
  align-self: flex-start;
  justify-content: flex-start;
  align-items: center;
  color: @alternateTextColor;
  background-color: @primaryColor;
  height: 56px;
  padding: 0 8px;
  width: 100%;
  .flex-shrink(0);
  z-index: 100;
  > .left,
  > .right{
    .flex-shrink(0);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 100%;
  }
  .mu-icon-button {
    color: inherit;
  }
  .mu-flat-button {
    color: inherit;
    height: 100%;
    line-height: 100%;
    min-width: auto;
  }
}
 
.mu-appbar-title {
  flex: 1;
  padding-left: 8px;
  padding-right: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow: hidden;
  font-size: 20px;
  font-weight: 400;
  line-height: 56px;
}
 
@media (min-width: 480px) {
  .mu-appbar-title {
    line-height: 64px;
  }
  .mu-appbar {
    height: 64px;
  }
  .mu-appbar-title {
    font-size: 24px;
  }
}
</style>