Sidebar.vue 693 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <script setup lang="ts">
  2. defineProps({
  3. title: { type: String, default: "Sidebar" }
  4. });
  5. </script>
  6. <template>
  7. <div class="sidebar" transition="slide">
  8. <div class="inner-wrapper">
  9. <div class="sidebar-title">{{ title }}</div>
  10. <slot name="content" />
  11. </div>
  12. </div>
  13. </template>
  14. <style lang="less" scoped>
  15. .inner-wrapper {
  16. overflow: auto;
  17. height: 100%;
  18. }
  19. .night-mode {
  20. .sidebar {
  21. background-color: var(--dark-grey-3);
  22. .sidebar-title {
  23. color: var(--white);
  24. }
  25. * {
  26. color: var(--light-grey-2);
  27. }
  28. }
  29. }
  30. .sidebar-title {
  31. background-color: var(--primary-color);
  32. text-align: center;
  33. padding: 10px;
  34. color: var(--white);
  35. font-weight: 600;
  36. font-size: 20px;
  37. }
  38. </style>