Skip to content

Commit

Permalink
✨ Refactor CSS (#5085)
Browse files Browse the repository at this point in the history
  • Loading branch information
damianpumar authored Jun 25, 2024
1 parent 461ac7e commit 4762f77
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<template>
<div class="panel" :class="isExpanded ? '--expanded' : '--collapsed'">
<div
class="panel"
:class="[
isExpanded ? '--expanded' : '--collapsed',
hideOnDesktop ? '--mobile' : undefined,
]"
>
<BaseButton class="panel__header" @click="toggleExpand(isExpanded)">
<slot name="panelHeader" />
<svgicon
Expand All @@ -25,6 +31,10 @@ export default {
type: Boolean,
default: false,
},
hideOnDesktop: {
type: Boolean,
default: false,
},
},
methods: {
toggleExpand(value) {
Expand Down Expand Up @@ -72,4 +82,10 @@ export default {
@include font-size(13px);
}
}
.--mobile {
@include media(">=desktop") {
display: none !important;
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@
</HorizontalResizable>
</template>
<BaseCollapsablePanel
class="--mobile"
:is-expanded="expandedGuidelines"
hideOnDesktop
:isExpanded="expandedGuidelines"
@toggle-expand="expandedGuidelines = !expandedGuidelines"
>
<template #panelHeader>
Expand Down Expand Up @@ -543,9 +543,4 @@ export default {
[data-title] {
@include tooltip-mini("right", 12px);
}
.--mobile {
@include media(">=desktop") {
display: none;
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@
</HorizontalResizable>
</template>
<BaseCollapsablePanel
class="--mobile"
:is-expanded="expandedGuidelines"
hideOnDesktop
:isExpanded="expandedGuidelines"
@toggle-expand="expandedGuidelines = !expandedGuidelines"
>
<template #panelHeader>
Expand Down Expand Up @@ -213,9 +213,4 @@ export default {
display: none;
}
}
.--mobile {
@include media(">=desktop") {
display: none;
}
}
</style>

0 comments on commit 4762f77

Please sign in to comment.