mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
add DescriptionRow component
This commit is contained in:
parent
8fb7cc8469
commit
6d659322b5
1 changed files with 59 additions and 0 deletions
59
app/src/components/globals/DescriptionRow.vue
Normal file
59
app/src/components/globals/DescriptionRow.vue
Normal file
|
@ -0,0 +1,59 @@
|
|||
<template>
|
||||
<b-row no-gutters class="description-row">
|
||||
<b-col v-bind="cols_">
|
||||
<slot name="term">
|
||||
<strong>{{ term }}</strong>
|
||||
</slot>
|
||||
</b-col>
|
||||
|
||||
<b-col>
|
||||
<slot name="default">
|
||||
{{ details }}
|
||||
</slot>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'DescriptionRow',
|
||||
|
||||
props: {
|
||||
term: { type: String, default: null },
|
||||
details: { type: String, default: null },
|
||||
cols: { type: Object, default: () => ({ md: 4, xl: 3 }) }
|
||||
},
|
||||
|
||||
computed: {
|
||||
cols_ () {
|
||||
return Object.assign({ md: 4, xl: 3 }, this.cols)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.description-row {
|
||||
@include media-breakpoint-up(md) {
|
||||
margin: .5rem 0;
|
||||
&:hover {
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
border-radius: 0.2rem;
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-down(sm) {
|
||||
flex-direction: column;
|
||||
|
||||
&:not(:last-of-type) {
|
||||
margin-bottom: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
border-bottom: $border-width solid $card-border-color;
|
||||
}
|
||||
}
|
||||
|
||||
.col {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Add table
Reference in a new issue