Title.vue 566 B

1234567891011121314151617181920212223242526272829303132
  1. <template>
  2. <LayoutContainer>
  3. <div>
  4. <h2 class="title" :style="{ color: titleColor }">{{ title }}</h2>
  5. </div>
  6. </LayoutContainer>
  7. </template>
  8. <script setup>
  9. import { defineProps } from "vue";
  10. const props = defineProps({
  11. title: String,
  12. titleColor: {
  13. type: String,
  14. default: "#000", // Default color is black, but it's overridden by passed props
  15. },
  16. });
  17. </script>
  18. <style scoped>
  19. .title {
  20. font-weight: 600;
  21. font-size: 3rem;
  22. line-height: 18px;
  23. color: inherit;
  24. margin-left: 2rem;
  25. line-height: 2.4rem;
  26. width: 35rem;
  27. }
  28. </style>