mirror of
https://github.com/Lissy93/dashy.git
synced 2025-04-08 17:06:18 +02:00
💄 Collapsible sections fill available space
This commit is contained in:
parent
25bc577fb1
commit
c3b6d2b0e0
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div
|
||||
:class="`collapsable ${rowColSpanClass} ${collapseClass}`"
|
||||
:class="`collapsable ${rowColSpanClass} ${collapseClass} ${!cutToHeight ? 'full-height' : ''}`"
|
||||
:style="`${color ? 'background: '+color : ''}; ${sanitizeCustomStyles(customStyles)};`"
|
||||
>
|
||||
<input
|
||||
@ -43,6 +43,7 @@ export default {
|
||||
rows: Number, // Set section vertical row span / height
|
||||
color: String, // Optional color override
|
||||
customStyles: String, // Optional custom stylings
|
||||
cutToHeight: Boolean, // To set section height with content height
|
||||
},
|
||||
components: {
|
||||
Icon,
|
||||
@ -252,5 +253,16 @@ export default {
|
||||
right: 0.5rem;
|
||||
top: 0.5rem;
|
||||
}
|
||||
// Makes sections fill available space
|
||||
&.is-open.full-height {
|
||||
height: -webkit-fill-available;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: normal;
|
||||
.collapsible-content {
|
||||
height: -webkit-fill-available;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -8,6 +8,7 @@
|
||||
:rows="displayData.rows"
|
||||
:color="displayData.color"
|
||||
:customStyles="displayData.customStyles"
|
||||
:cutToHeight="displayData.cutToHeight"
|
||||
@openEditSection="openEditSection"
|
||||
@openContextMenu="openContextMenu"
|
||||
>
|
||||
|
Loading…
x
Reference in New Issue
Block a user