mirror of https://github.com/rancher/dashboard.git
76 lines
1.4 KiB
Vue
76 lines
1.4 KiB
Vue
<script>
|
|
export default {
|
|
props: {
|
|
title: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
content: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
buttonAction: {
|
|
type: Function,
|
|
default: () => {}
|
|
},
|
|
buttonText: {
|
|
type: String,
|
|
default: 'go'
|
|
},
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<template>
|
|
<div class="card-container">
|
|
<div class="card-title">
|
|
<slot name="title">
|
|
{{ title }}
|
|
</slot>
|
|
</div>
|
|
<div class="card-body">
|
|
<slot name="body">
|
|
{{ content }}
|
|
</slot>
|
|
</div>
|
|
<div class="card-actions">
|
|
<slot name="actions">
|
|
<button class="btn role-primary" @click="buttonAction">
|
|
{{ buttonText }}
|
|
</button>
|
|
</slot>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<style lang='scss'>
|
|
.card-container {
|
|
padding: 10px;
|
|
border: 1px solid var(--border);
|
|
background: var(--nav-bg);
|
|
display: grid;
|
|
padding: 1.25rem;
|
|
grid-gap: .75rem;
|
|
grid-template-rows: 1fr 2fr 1fr;
|
|
& .card-body {
|
|
overflow: hidden;
|
|
}
|
|
& .card-actions {
|
|
align-self: end;
|
|
display: flex;
|
|
justify-content: center;
|
|
|
|
button {
|
|
margin: 0 5px;
|
|
}
|
|
}
|
|
& .card-title {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding-bottom: 0.5rem;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
}
|
|
</style>
|