2020-05-10 22:29:24 +00:00
|
|
|
<template lang='pug'>
|
|
|
|
.v-card-info(:class='`is-` + color')
|
2020-05-11 04:40:51 +00:00
|
|
|
v-card-text.d-flex.align-center(:class='colors.cls')
|
2020-05-10 22:29:24 +00:00
|
|
|
v-icon(:color='colors.icon', left) {{icon}}
|
|
|
|
slot
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
color: {
|
|
|
|
type: String,
|
|
|
|
default: 'blue'
|
|
|
|
},
|
|
|
|
icon: {
|
|
|
|
type: String,
|
|
|
|
default: 'mdi-information-outline'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
colors () {
|
|
|
|
switch (this.color) {
|
|
|
|
case 'blue':
|
|
|
|
return {
|
2020-05-11 04:40:51 +00:00
|
|
|
cls: this.$vuetify.theme.dark ? 'grey darken-4-l5 blue--text text--lighten-4' : 'blue lighten-5 blue--text text--darken-3',
|
2020-05-10 22:29:24 +00:00
|
|
|
icon: 'blue lighten-3'
|
|
|
|
}
|
|
|
|
case 'red':
|
|
|
|
return {
|
2020-05-11 04:40:51 +00:00
|
|
|
cls: this.$vuetify.theme.dark ? 'grey darken-4-l5 red--text text--lighten-4' : 'red lighten-5 red--text text--darken-2',
|
2020-05-10 22:29:24 +00:00
|
|
|
icon: 'red lighten-3'
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
return {
|
|
|
|
cls: this.$vuetify.theme.dark ? 'grey darken-4-l5' : 'grey lighten-4',
|
|
|
|
icon: 'grey darken-2'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
.v-card-info {
|
|
|
|
border-bottom: 1px solid #EEE;
|
|
|
|
|
|
|
|
&.is-blue {
|
|
|
|
border-bottom-color: mc('blue', '100');
|
2020-05-11 04:40:51 +00:00
|
|
|
|
|
|
|
@at-root .theme--dark & {
|
|
|
|
border-bottom-color: rgba(mc('blue', '100'), .3);
|
|
|
|
}
|
2020-05-10 22:29:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&.is-red {
|
|
|
|
border-bottom-color: mc('red', '100');
|
2020-05-11 04:40:51 +00:00
|
|
|
|
|
|
|
@at-root .theme--dark & {
|
|
|
|
border-bottom-color: rgba(mc('red', '100'), .3);
|
|
|
|
}
|
2020-05-10 22:29:24 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|