Skip to content

Commit

Permalink
feature: show/hide share links (#709)
Browse files Browse the repository at this point in the history
* adding logic for showShareLinks on content pages

* changeset
  • Loading branch information
stephiescastle authored Dec 3, 2024
1 parent 18c64cc commit 039afc4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/lucky-zebras-yell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@explorer-1/vue": patch
---

Adding logic to show/hide share links on content pages
9 changes: 9 additions & 0 deletions packages/vue/src/templates/PageContent/PageContent.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const ContentPageData = {
breadcrumb: NavSecondaryData.breadcrumb,
title: 'Make a Paper Mars Helicopter',
displayLabel: 'Classroom Activity',
showShareLinks: true,
heroPosition: 'inline',
heroImage: HeroMediaData.image,
heroImageInline: HeroMediaData.imageInline,
Expand Down Expand Up @@ -87,3 +88,11 @@ export const BaseStory = {
data: ContentPageData
}
}
export const NoShareLinks = {
args: {
data: {
...ContentPageData,
showShareLinks: false
}
}
}
2 changes: 1 addition & 1 deletion packages/vue/src/templates/PageContent/PageContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export default defineComponent({
class="lg:mb-0 relative mb-8"
>
<ShareButtons
v-if="data.title && data.url && !themeStore.isEdu"
v-if="data.showShareLinks && data.title && data.url && !themeStore.isEdu"
:title="data.title"
:url="data.url"
/>
Expand Down

0 comments on commit 039afc4

Please sign in to comment.