diff --git a/button/internal/button.ts b/button/internal/button.ts index 82c5e2dad9..99679e4b99 100644 --- a/button/internal/button.ts +++ b/button/internal/button.ts @@ -79,7 +79,7 @@ export abstract class Button extends buttonBaseClass implements FormSubmitter { false; /** - * The default behavior of the button. May be "text", "reset", or "submit" + * The default behavior of the button. May be "button", "reset", or "submit" * (default). */ @property() type: FormSubmitterType = 'submit'; @@ -135,7 +135,10 @@ export abstract class Button extends buttonBaseClass implements FormSubmitter { ${this.renderElevationOrOutline?.()}
- + ${buttonOrLink} `; } diff --git a/docs/components/button.md b/docs/components/button.md index 49cdf4706f..2db15a1c2a 100644 --- a/docs/components/button.md +++ b/docs/components/button.md @@ -717,7 +717,7 @@ Token | Default value | `target` | `target` | `string` | `''` | Where to display the linked `href` URL for a link button. Common options include `_blank` to open in a new tab. | | `trailingIcon` | `trailing-icon` | `boolean` | `false` | Whether to render the icon at the inline end of the label rather than the inline start.
_Note:_ Link buttons cannot have trailing icons. | | `hasIcon` | `has-icon` | `boolean` | `false` | Whether to display the icon or not. | -| `type` | `type` | `string` | `'submit'` | The default behavior of the button. May be "text", "reset", or "submit" (default). | +| `type` | `type` | `string` | `'submit'` | The default behavior of the button. May be "button", "reset", or "submit" (default). | | `value` | `value` | `string` | `''` | The value added to a form with the button's name when the button submits a form. | | `name` | | `string` | `undefined` | | | `form` | | `HTMLFormElement` | `undefined` | | @@ -737,7 +737,7 @@ Token | Default value | `target` | `target` | `string` | `''` | Where to display the linked `href` URL for a link button. Common options include `_blank` to open in a new tab. | | `trailingIcon` | `trailing-icon` | `boolean` | `false` | Whether to render the icon at the inline end of the label rather than the inline start.
_Note:_ Link buttons cannot have trailing icons. | | `hasIcon` | `has-icon` | `boolean` | `false` | Whether to display the icon or not. | -| `type` | `type` | `string` | `'submit'` | The default behavior of the button. May be "text", "reset", or "submit" (default). | +| `type` | `type` | `string` | `'submit'` | The default behavior of the button. May be "button", "reset", or "submit" (default). | | `value` | `value` | `string` | `''` | The value added to a form with the button's name when the button submits a form. | | `name` | | `string` | `undefined` | | | `form` | | `HTMLFormElement` | `undefined` | | @@ -757,7 +757,7 @@ Token | Default value | `target` | `target` | `string` | `''` | Where to display the linked `href` URL for a link button. Common options include `_blank` to open in a new tab. | | `trailingIcon` | `trailing-icon` | `boolean` | `false` | Whether to render the icon at the inline end of the label rather than the inline start.
_Note:_ Link buttons cannot have trailing icons. | | `hasIcon` | `has-icon` | `boolean` | `false` | Whether to display the icon or not. | -| `type` | `type` | `string` | `'submit'` | The default behavior of the button. May be "text", "reset", or "submit" (default). | +| `type` | `type` | `string` | `'submit'` | The default behavior of the button. May be "button", "reset", or "submit" (default). | | `value` | `value` | `string` | `''` | The value added to a form with the button's name when the button submits a form. | | `name` | | `string` | `undefined` | | | `form` | | `HTMLFormElement` | `undefined` | | @@ -777,7 +777,7 @@ Token | Default value | `target` | `target` | `string` | `''` | Where to display the linked `href` URL for a link button. Common options include `_blank` to open in a new tab. | | `trailingIcon` | `trailing-icon` | `boolean` | `false` | Whether to render the icon at the inline end of the label rather than the inline start.
_Note:_ Link buttons cannot have trailing icons. | | `hasIcon` | `has-icon` | `boolean` | `false` | Whether to display the icon or not. | -| `type` | `type` | `string` | `'submit'` | The default behavior of the button. May be "text", "reset", or "submit" (default). | +| `type` | `type` | `string` | `'submit'` | The default behavior of the button. May be "button", "reset", or "submit" (default). | | `value` | `value` | `string` | `''` | The value added to a form with the button's name when the button submits a form. | | `name` | | `string` | `undefined` | | | `form` | | `HTMLFormElement` | `undefined` | | @@ -797,7 +797,7 @@ Token | Default value | `target` | `target` | `string` | `''` | Where to display the linked `href` URL for a link button. Common options include `_blank` to open in a new tab. | | `trailingIcon` | `trailing-icon` | `boolean` | `false` | Whether to render the icon at the inline end of the label rather than the inline start.
_Note:_ Link buttons cannot have trailing icons. | | `hasIcon` | `has-icon` | `boolean` | `false` | Whether to display the icon or not. | -| `type` | `type` | `string` | `'submit'` | The default behavior of the button. May be "text", "reset", or "submit" (default). | +| `type` | `type` | `string` | `'submit'` | The default behavior of the button. May be "button", "reset", or "submit" (default). | | `value` | `value` | `string` | `''` | The value added to a form with the button's name when the button submits a form. | | `name` | | `string` | `undefined` | | | `form` | | `HTMLFormElement` | `undefined` | | diff --git a/docs/components/icon-button.md b/docs/components/icon-button.md index f28a4a4240..e0196cdf03 100644 --- a/docs/components/icon-button.md +++ b/docs/components/icon-button.md @@ -444,7 +444,7 @@ Token | Default value | `ariaLabelSelected` | `aria-label-selected` | `string` | `''` | The `aria-label` of the button when the button is toggleable and selected. | | `toggle` | `toggle` | `boolean` | `false` | When true, the button will toggle between selected and unselected states | | `selected` | `selected` | `boolean` | `false` | Sets the selected state. When false, displays the default icon. When true, displays the selected icon, or the default icon If no `slot="selected"` icon is provided. | -| `type` | `type` | `string` | `'submit'` | The default behavior of the button. May be "text", "reset", or "submit" (default). | +| `type` | `type` | `string` | `'submit'` | The default behavior of the button. May be "button", "reset", or "submit" (default). | | `value` | `value` | `string` | `''` | The value added to a form with the button's name when the button submits a form. | | `name` | | `string` | `undefined` | | | `form` | | `HTMLFormElement` | `undefined` | | @@ -478,7 +478,7 @@ Token | Default value | `ariaLabelSelected` | `aria-label-selected` | `string` | `''` | The `aria-label` of the button when the button is toggleable and selected. | | `toggle` | `toggle` | `boolean` | `false` | When true, the button will toggle between selected and unselected states | | `selected` | `selected` | `boolean` | `false` | Sets the selected state. When false, displays the default icon. When true, displays the selected icon, or the default icon If no `slot="selected"` icon is provided. | -| `type` | `type` | `string` | `'submit'` | The default behavior of the button. May be "text", "reset", or "submit" (default). | +| `type` | `type` | `string` | `'submit'` | The default behavior of the button. May be "button", "reset", or "submit" (default). | | `value` | `value` | `string` | `''` | The value added to a form with the button's name when the button submits a form. | | `name` | | `string` | `undefined` | | | `form` | | `HTMLFormElement` | `undefined` | | @@ -512,7 +512,7 @@ Token | Default value | `ariaLabelSelected` | `aria-label-selected` | `string` | `''` | The `aria-label` of the button when the button is toggleable and selected. | | `toggle` | `toggle` | `boolean` | `false` | When true, the button will toggle between selected and unselected states | | `selected` | `selected` | `boolean` | `false` | Sets the selected state. When false, displays the default icon. When true, displays the selected icon, or the default icon If no `slot="selected"` icon is provided. | -| `type` | `type` | `string` | `'submit'` | The default behavior of the button. May be "text", "reset", or "submit" (default). | +| `type` | `type` | `string` | `'submit'` | The default behavior of the button. May be "button", "reset", or "submit" (default). | | `value` | `value` | `string` | `''` | The value added to a form with the button's name when the button submits a form. | | `name` | | `string` | `undefined` | | | `form` | | `HTMLFormElement` | `undefined` | | @@ -546,7 +546,7 @@ Token | Default value | `ariaLabelSelected` | `aria-label-selected` | `string` | `''` | The `aria-label` of the button when the button is toggleable and selected. | | `toggle` | `toggle` | `boolean` | `false` | When true, the button will toggle between selected and unselected states | | `selected` | `selected` | `boolean` | `false` | Sets the selected state. When false, displays the default icon. When true, displays the selected icon, or the default icon If no `slot="selected"` icon is provided. | -| `type` | `type` | `string` | `'submit'` | The default behavior of the button. May be "text", "reset", or "submit" (default). | +| `type` | `type` | `string` | `'submit'` | The default behavior of the button. May be "button", "reset", or "submit" (default). | | `value` | `value` | `string` | `''` | The value added to a form with the button's name when the button submits a form. | | `name` | | `string` | `undefined` | | | `form` | | `HTMLFormElement` | `undefined` | | diff --git a/iconbutton/internal/icon-button.ts b/iconbutton/internal/icon-button.ts index 1f33f31a16..f3bba31b6e 100644 --- a/iconbutton/internal/icon-button.ts +++ b/iconbutton/internal/icon-button.ts @@ -92,7 +92,7 @@ export class IconButton extends iconButtonBaseClass implements FormSubmitter { @property({type: Boolean, reflect: true}) selected = false; /** - * The default behavior of the button. May be "text", "reset", or "submit" + * The default behavior of the button. May be "button", "reset", or "submit" * (default). */ @property() type: FormSubmitterType = 'submit';