Sidebar.vue 693 B

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