Skip to content

Commit

Permalink
fix(button): href and target default value is now an empty string
Browse files Browse the repository at this point in the history
The type of `target` has also been made stricter, now only accepting '_blank'|'_parent'|'_self'|'_top'|''.

PiperOrigin-RevId: 557624071
  • Loading branch information
AndrewJakubowicz authored and copybara-github committed Aug 16, 2023
1 parent 89f0327 commit d665864
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions button/internal/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ export abstract class Button extends LitElement implements FormSubmitter {
/**
* The URL that the link button points to.
*/
@property() href?: string;
@property() href = '';

/**
* Where to display the linked `href` URL for a link button. Common options
* include `_blank` to open in a new tab.
*/
@property() target?: string;
@property() target: '_blank'|'_parent'|'_self'|'_top'|'' = '';

/**
* Whether to render the icon at the inline end of the label rather than the
Expand Down

0 comments on commit d665864

Please sign in to comment.