2021-01-17 18:57:57 +01:00
|
|
|
<template>
|
2021-01-21 23:33:16 +01:00
|
|
|
<div class="card" :class="{'has-no-shadow': !shadow}">
|
2021-01-17 18:57:57 +01:00
|
|
|
<header class="card-header" v-if="title !== ''">
|
|
|
|
<p class="card-header-title">
|
|
|
|
{{ title }}
|
|
|
|
</p>
|
|
|
|
<a @click="$emit('close')" class="card-header-icon" v-if="hasClose">
|
|
|
|
<span class="icon">
|
2021-01-21 23:33:16 +01:00
|
|
|
<icon :icon="closeIcon"/>
|
2021-01-17 18:57:57 +01:00
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</header>
|
|
|
|
<div class="card-content" :class="{'p-0': !padding}">
|
|
|
|
<div class="content">
|
|
|
|
<slot></slot>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name: 'card',
|
|
|
|
props: {
|
|
|
|
title: {
|
|
|
|
type: String,
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
padding: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true,
|
|
|
|
},
|
|
|
|
hasClose: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false,
|
|
|
|
},
|
2021-01-21 23:33:16 +01:00
|
|
|
closeIcon: {
|
|
|
|
type: String,
|
|
|
|
default: 'angle-right',
|
|
|
|
},
|
|
|
|
shadow: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true,
|
|
|
|
},
|
2021-01-17 18:57:57 +01:00
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|