Skip to content

Commit

Permalink
feat(theme/i18n): allow customizing sponsor link's text (#3276)
Browse files Browse the repository at this point in the history
Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com>
  • Loading branch information
Дмитрий Бондарев and brc-dd authored Dec 27, 2023
1 parent 8687b86 commit 9c20e3b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/reference/default-theme-team-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ interface TeamMember {

// URL for the sponsor page for the member.
sponsor?: string

// Text for the sponsor link. Defaults to 'Sponsor'.
actionText?: string
}
```

Expand Down
2 changes: 1 addition & 1 deletion src/client/theme-default/components/VPTeamMembersItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ withDefaults(defineProps<Props>(), {
</div>
<div v-if="member.sponsor" class="sp">
<VPLink class="sp-link" :href="member.sponsor" no-icon>
<VPIconHeart class="sp-icon" /> Sponsor
<VPIconHeart class="sp-icon" /> {{ member.actionText || 'Sponsor' }}
</VPLink>
</div>
</article>
Expand Down
1 change: 1 addition & 0 deletions types/default-theme.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ export namespace DefaultTheme {
desc?: string
links?: SocialLink[]
sponsor?: string
actionText?: string
}

// outline -------------------------------------------------------------------
Expand Down

0 comments on commit 9c20e3b

Please sign in to comment.