mirror of
https://github.com/Lissy93/dashy.git
synced 2025-07-29 00:25:02 +02:00
🎨 Adds section-specific class names (#769)
This commit is contained in:
parent
113f31a93a
commit
4210c985b7
@ -2,7 +2,7 @@
|
|||||||
<div
|
<div
|
||||||
v-bind:class="[
|
v-bind:class="[
|
||||||
{ 'is-open': isExpanded, 'full-height': cutToHeight },
|
{ 'is-open': isExpanded, 'full-height': cutToHeight },
|
||||||
`collapsable ${rowColSpanClass}`
|
`collapsable ${rowColSpanClass}`, sectionClassName
|
||||||
]"
|
]"
|
||||||
:style="`${color ? 'background: '+color : ''}; ${sanitizeCustomStyles(customStyles)};`"
|
:style="`${color ? 'background: '+color : ''}; ${sanitizeCustomStyles(customStyles)};`"
|
||||||
>
|
>
|
||||||
@ -74,6 +74,10 @@ export default {
|
|||||||
const { rows, cols, checkSpanNum } = this;
|
const { rows, cols, checkSpanNum } = this;
|
||||||
return `${checkSpanNum(cols, 'col')} ${checkSpanNum(rows, 'row')}`;
|
return `${checkSpanNum(cols, 'col')} ${checkSpanNum(rows, 'row')}`;
|
||||||
},
|
},
|
||||||
|
sectionClassName() {
|
||||||
|
if (!this.title) return 'unnamed-section';
|
||||||
|
return `section_${this.title.replaceAll(' ', '-').toLowerCase()}`;
|
||||||
|
},
|
||||||
/* Used to fetch initial collapse state, and set new collapse state on change */
|
/* Used to fetch initial collapse state, and set new collapse state on change */
|
||||||
isExpanded: {
|
isExpanded: {
|
||||||
get() {
|
get() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user