aboutsummaryrefslogtreecommitdiffstats
path: root/components/editor/EditorSidebarMainConfiguration.vue
blob: 9ebef0e7bbb14fda78ddc541d914a3499d40c7f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<script setup lang="ts">
import { computed } from 'vue';

const route = useRoute();

const setSelected = () => {
  navigateToEditorPane('config');
};

const selected = computed(() => {
  return route.path.startsWith('/editor/config');
});
</script>

<template>
  <div id="container" :class="{ selected: selected }">
    <span id="title" @click="setSelected">
      <font-awesome-icon class="icon" :icon="['fas', 'wrench']" />
      <span id="name">
        Configuration
      </span>
    </span>
  </div>
</template>

<style scoped>
#container {
  cursor: pointer;
  padding: 0.5rem 1rem;
  transition: background-color 0.3s;
  max-height: 45px;
  overflow-y: hidden;

  #title {
    display: flex;
    align-items: center;
    margin: 0;
    gap: 1rem;
    font-size: 1.1rem;

    #name {
      display: flex;
      flex-direction: column;
      align-items: left;
    }
  }
}

.selected {
  background-color: var(--color-primary-mute);
}

#container:hover {
  background-color: var(--color-hover);
}
</style>