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
pokedim13 and brc-dd committed 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
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
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
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.