mirror of
https://github.com/romancm/gamebrary
synced 2024-12-21 08:43:04 +00:00
57 lines
933 B
Vue
57 lines
933 B
Vue
<template lang="html">
|
|
<header>
|
|
<div>
|
|
<h5 class="mb-0">{{ title }}</h5>
|
|
<small class="d-block text-muted">{{ subtitle }}</small>
|
|
</div>
|
|
|
|
<div class="actions">
|
|
<slot />
|
|
|
|
<b-button
|
|
:variant="nightMode ? 'dark' : 'light'"
|
|
size="sm"
|
|
class="ml-auto"
|
|
@click="$emit('close')"
|
|
>
|
|
<icon name="x" />
|
|
</b-button>
|
|
</div>
|
|
</header>
|
|
</template>
|
|
|
|
<script>
|
|
import { mapGetters } from 'vuex';
|
|
|
|
export default {
|
|
props: {
|
|
title: String,
|
|
subtitle: String,
|
|
},
|
|
|
|
computed: {
|
|
...mapGetters(['nightMode']),
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss" rel="stylesheet/scss" scoped>
|
|
header {
|
|
display: grid;
|
|
width: 100%;
|
|
align-items: center;
|
|
grid-template-columns: auto auto;
|
|
}
|
|
|
|
h5 {
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
line-height: 0.8;
|
|
}
|
|
|
|
.actions {
|
|
margin-left: auto;
|
|
align-self: flex-start;
|
|
}
|
|
</style>
|