Files
cloudron-box/dashboard/src/components/Section.vue
T

80 lines
1.2 KiB
Vue
Raw Normal View History

<script>
export default {
name: 'Section',
props: {
title: String,
padding: {
type: Boolean,
default: true,
}
}
};
</script>
2025-01-17 12:24:48 +01:00
<template>
<div class="section" :class="{ 'section-extra-padding': padding }">
2025-01-17 14:02:05 +01:00
<h2 class="section-header">
2025-02-20 10:54:43 +01:00
<slot name="header-title">{{ title }}</slot>
2025-01-28 13:55:05 +01:00
<div><slot name="header-buttons"></slot></div>
2025-01-17 14:02:05 +01:00
</h2>
2025-01-17 12:24:48 +01:00
<hr class="section-divider"/>
<div class="section-body">
2025-01-17 14:02:05 +01:00
<slot></slot>
2025-01-17 12:24:48 +01:00
</div>
</div>
</template>
<style scoped>
2025-02-10 16:11:36 +01:00
.section {
2025-04-07 23:04:49 +02:00
margin-bottom: 30px;
2025-02-10 16:11:36 +01:00
}
2025-01-17 12:24:48 +01:00
.section-header {
2025-01-17 15:12:26 +01:00
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
gap: 5px;
2025-01-17 14:02:05 +01:00
padding-left: 15px;
padding-right: 15px;
padding-top: 25px;
margin-top: 0;
}
.section-header > div {
display: flex;
gap: 6px;
2025-03-26 16:04:58 +01:00
flex-wrap: wrap;
2025-01-17 12:24:48 +01:00
}
.section-divider {
border-color: #d8dee4;
border-width: 1px;
margin-top: 10px;
margin-bottom: 10px;
}
2025-01-17 14:02:05 +01:00
@media (prefers-color-scheme: dark) {
.section-divider {
border-color: #495057;
}
}
2025-01-17 12:24:48 +01:00
.section-body {
position: relative;
margin-bottom: 15px;
padding: 10px 15px;
border-radius: 10px;
padding-bottom: 25px;
2025-01-17 12:24:48 +01:00
}
.section-extra-padding .section-body {
padding-left: 25px;
padding-right: 25px;
}
2025-01-17 12:24:48 +01:00
</style>