Skip to content

Commit

Permalink
style the back component
Browse files Browse the repository at this point in the history
  • Loading branch information
ozer550 committed Nov 26, 2024
1 parent b7665ec commit 9c2b48d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,17 @@
@shouldFocusFirstEl="() => null"
>
<template #header>
<h1 class="side-panel-title">
{{ !showSearch ? searchLabel$() : $tr('manageLessonResourcesTitle') }}
</h1>
<div :class="{ 'back-button-class': !showSearch }">
<KIconButton
v-if="!showSearch"
icon="back"
class="back-button-style"
@click="showSearch = true"
/>
<h1 class="side-panel-title">
{{ !showSearch ? searchLabel$() : $tr('manageLessonResourcesTitle') }}
</h1>
</div>
</template>

<div v-if="!showSearch">
Expand Down Expand Up @@ -179,11 +187,7 @@
},
methods: {
closeSidePanel() {
if (this.showSearch == true) {
this.$router.go(-1);
} else {
this.showSearch = true;
}
this.$router.go(-1);
},
},
$trs: {
Expand Down Expand Up @@ -223,4 +227,16 @@
width: 100%;
}
.back-button-class {
display: flex;
align-items: center;
justify-content: space-between;
width: 6.5rem;
}
.back-button-style {
position: relative;
top: 3.8px;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -294,3 +294,4 @@
}
</style>
section

0 comments on commit 9c2b48d

Please sign in to comment.