Skip to content

Commit

Permalink
feat(discord-invite): localization support for invite title and button (
Browse files Browse the repository at this point in the history
  • Loading branch information
sawa-ko committed Dec 22, 2021
1 parent 792e791 commit 8fd541b
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions packages/core/src/components/discord-invite/discord-invite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,24 @@ export class DiscordInvite implements ComponentInterface {
@Prop()
public partnered = false;

/**
* Invitation embed title.
* @default "You've been invited to join a server"
*/
@Prop()
public inviteTitle = "You've been invited to join a server";

/**
* The join button.
* @default 'Join'
*/
@Prop()
public joinBtn = 'Join';

public render() {
return (
<div class="discord-invite">
<div class="discord-invite-header">You've been invited to join a server</div>
<div class="discord-invite-header">{this.inviteTitle}</div>
<div class="discord-invite-root">
<img class="discord-invite-icon" src={this.icon} alt={this.name} />
<div class="discord-invite-info">
Expand All @@ -91,7 +105,7 @@ export class DiscordInvite implements ComponentInterface {
</div>
</div>
<a class="discord-invite-join" href={this.url} target="_blank" rel="noopener noreferrer">
Join
{this.joinBtn}
</a>
</div>
</div>
Expand Down

0 comments on commit 8fd541b

Please sign in to comment.