-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fixes FAQs on pages that use ContentfulPage
* Adds a wrapper component that can be used in conjunction with KvFrequentlyAskedQuestions for contentful pages VUE-790
- Loading branch information
1 parent
399339f
commit d49caab
Showing
7 changed files
with
105 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<template> | ||
<section-with-background-classic | ||
:background-content="background" | ||
:vertical-padding="verticalPadding" | ||
> | ||
<template #content> | ||
<kv-page-container> | ||
<kv-frequently-asked-questions | ||
:headline="frequentlyAskedQuestionsHeadline" | ||
:questions="frequentlyAskedQuestions" | ||
/> | ||
</kv-page-container> | ||
</template> | ||
</section-with-background-classic> | ||
</template> | ||
|
||
<script> | ||
import contentfulStylesMixin from '@/plugins/contentful-ui-setting-styles-mixin'; | ||
import SectionWithBackgroundClassic from '@/components/Contentful/SectionWithBackgroundClassic'; | ||
import KvFrequentlyAskedQuestions from '@/components/Kv/KvFrequentlyAskedQuestions'; | ||
import KvPageContainer from '~/@kiva/kv-components/vue/KvPageContainer'; | ||
export default { | ||
components: { | ||
KvFrequentlyAskedQuestions, | ||
KvPageContainer, | ||
SectionWithBackgroundClassic, | ||
}, | ||
mixins: [contentfulStylesMixin], | ||
props: { | ||
/** | ||
* Content group content from Contentful | ||
* */ | ||
content: { | ||
type: Object, | ||
default: () => {}, | ||
}, | ||
}, | ||
computed: { | ||
frequentlyAskedQuestionsHeadline() { | ||
return this.content?.title ?? null; | ||
}, | ||
frequentlyAskedQuestions() { | ||
return this.content?.contents ?? null; | ||
}, | ||
background() { | ||
return this.content?.contents?.find(({ contentType }) => { | ||
return contentType ? contentType === 'background' : false; | ||
}); | ||
}, | ||
}, | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters