Skip to content

Commit

Permalink
fix(button)!: normalize compound properties to have kebab-cased attri…
Browse files Browse the repository at this point in the history
…butes

BREAKING_CHANGE: The attributes `trailingicon`, and `hasicon` have been renamed to `trailing-icon` and `has-icon` respectively.
PiperOrigin-RevId: 542447334
  • Loading branch information
AndrewJakubowicz authored and copybara-github committed Jun 22, 2023
1 parent 34dfcb4 commit 1a6fc29
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions button/demo/stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const elevated: MaterialStoryInit<StoryKnobs> = {
aria-label=${ariaLabelMsg('elevated', linkLabel)}
href="https://google.com"
target="_blank"
trailingicon
trailing-icon
>
${linkLabel}
<md-icon slot="icon" aria-hidden="true">open_in_new</md-icon>
Expand All @@ -63,7 +63,7 @@ const filled: MaterialStoryInit<StoryKnobs> = {
aria-label=${ariaLabelMsg('filled', linkLabel)}
href="https://google.com"
target="_blank"
trailingicon
trailing-icon
>
${linkLabel}
<md-icon slot="icon" aria-hidden="true">open_in_new</md-icon>
Expand All @@ -89,7 +89,7 @@ const tonal: MaterialStoryInit<StoryKnobs> = {
aria-label=${ariaLabelMsg('tonal', linkLabel)}
href="https://google.com"
target="_blank"
trailingicon
trailing-icon
>
${linkLabel}
<md-icon slot="icon" aria-hidden="true">open_in_new</md-icon>
Expand All @@ -115,7 +115,7 @@ const outlined: MaterialStoryInit<StoryKnobs> = {
aria-label=${ariaLabelMsg('outlined', linkLabel)}
href="https://google.com"
target="_blank"
trailingicon
trailing-icon
>
${linkLabel}
<md-icon slot="icon" aria-hidden="true">open_in_new</md-icon>
Expand All @@ -141,7 +141,7 @@ const text: MaterialStoryInit<StoryKnobs> = {
aria-label=${ariaLabelMsg('text', linkLabel)}
href="https://google.com"
target="_blank"
trailingicon
trailing-icon
>
${linkLabel}
<md-icon slot="icon" aria-hidden="true">open_in_new</md-icon>
Expand Down
4 changes: 2 additions & 2 deletions button/lib/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ export abstract class Button extends LitElement {
*
* _Note:_ Link buttons cannot have trailing icons.
*/
@property({type: Boolean, attribute: 'trailingicon'}) trailingIcon = false;
@property({type: Boolean, attribute: 'trailing-icon'}) trailingIcon = false;

/**
* Whether to display the icon or not.
*/
@property({type: Boolean}) hasIcon = false;
@property({type: Boolean, attribute: 'has-icon'}) hasIcon = false;

/**
* Whether `preventDefault()` should be called on the underlying button.
Expand Down

0 comments on commit 1a6fc29

Please sign in to comment.