From 54c5b767b4e2d00eeefde29fbced7f1adb6380bd Mon Sep 17 00:00:00 2001 From: tinuola <24995224+tinuola@users.noreply.github.com> Date: Fri, 15 Dec 2023 13:35:05 -0800 Subject: [PATCH] feat: APPS-2468 BannerText component (#424) * fix: changes from rebase * feat: add BannerText comp, spec, stories * fix: use of index in v-for directive * feat: add BannerHeader comp, spec, stories, types * fix: rebase * fix: syntax update * fix: syntax update * fix: syntax updates * task: remove commented out code --------- Co-authored-by: tinuola --- src/lib-components/BannerFeatured.vue | 2 +- src/lib-components/BannerHeader.vue | 10 +- src/lib-components/BannerText.vue | 615 ++++++++++++++++++ src/lib-components/BlockCardWithImage.vue | 2 +- src/lib-components/BlockClippedDate.vue | 2 +- src/lib-components/BlockFloatingHighlight.vue | 2 +- .../Flexible/MediaGallery/NewLightbox.vue | 4 +- src/lib-components/MastheadPrimary.vue | 2 +- src/lib-components/MastheadSecondary.vue | 2 +- src/lib-components/ResponsiveImage.vue | 2 +- src/lib-components/index.js | 1 + src/stories/BannerText.spec.js | 26 + src/stories/BannerText.stories.js | 274 ++++++++ 13 files changed, 931 insertions(+), 13 deletions(-) create mode 100644 src/lib-components/BannerText.vue create mode 100644 src/stories/BannerText.spec.js create mode 100644 src/stories/BannerText.stories.js diff --git a/src/lib-components/BannerFeatured.vue b/src/lib-components/BannerFeatured.vue index 86009c140..8481ecc04 100644 --- a/src/lib-components/BannerFeatured.vue +++ b/src/lib-components/BannerFeatured.vue @@ -34,7 +34,7 @@ import getSectionName from '@/utils/getSectionName' const props = defineProps({ image: { type: Object as PropType, - default: () => ({}), + default: () => {}, }, title: { type: String, diff --git a/src/lib-components/BannerHeader.vue b/src/lib-components/BannerHeader.vue index 4993ce6b0..7eec50e4a 100644 --- a/src/lib-components/BannerHeader.vue +++ b/src/lib-components/BannerHeader.vue @@ -17,7 +17,7 @@ import ResponsiveImage from '@/lib-components/ResponsiveImage.vue' // Enable BlockForm in template // import BlockForm from '@/lib-components/BlockForm.vue' -import type { BylineItemType, ImageItemType, LocationItemType, SubjectAreaItemType } from '@/types/types' +import type { ImageItemType, LocationItemType, SubjectAreaItemType } from '@/types/types' // Utility functions import formatEventTimes from '@/utils/formatEventTimes' @@ -27,7 +27,7 @@ import getSectionName from '@/utils/getSectionName' const props = defineProps({ image: { type: Object as PropType, - default: () => ({}), + default: () => {}, }, title: { type: String, @@ -38,7 +38,7 @@ const props = defineProps({ default: '', }, byline: { - type: Array as PropType, + type: Array as PropType, default: () => [], }, contributors: { @@ -291,7 +291,7 @@ const parsedLocations = computed(() => {