diff --git a/button/internal/button.ts b/button/internal/button.ts index 51969abc0d..15f418c371 100644 --- a/button/internal/button.ts +++ b/button/internal/button.ts @@ -14,8 +14,8 @@ import {ARIAMixinStrict} from '../../internal/aria/aria.js'; import {requestUpdateOnAriaChange} from '../../internal/aria/delegate.js'; import { FormSubmitter, - type FormSubmitterType, setupFormSubmitter, + type FormSubmitterType, } from '../../internal/controller/form-submitter.js'; import { dispatchActivationClick, @@ -78,9 +78,17 @@ export abstract class Button extends buttonBaseClass implements FormSubmitter { @property({type: Boolean, attribute: 'has-icon', reflect: true}) hasIcon = false; + /** + * The default behavior of the button. May be "text", "reset", or "submit" + * (default). + */ @property() type: FormSubmitterType = 'submit'; - @property() value = ''; + /** + * The value added to a form with the button's name when the button submits a + * form. + */ + @property({reflect: true}) value = ''; get name() { return this.getAttribute('name') ?? ''; diff --git a/iconbutton/internal/icon-button.ts b/iconbutton/internal/icon-button.ts index 8dfaa299c6..1f33f31a16 100644 --- a/iconbutton/internal/icon-button.ts +++ b/iconbutton/internal/icon-button.ts @@ -16,8 +16,8 @@ import {ARIAMixinStrict} from '../../internal/aria/aria.js'; import {requestUpdateOnAriaChange} from '../../internal/aria/delegate.js'; import { FormSubmitter, - type FormSubmitterType, setupFormSubmitter, + type FormSubmitterType, } from '../../internal/controller/form-submitter.js'; import {isRtl} from '../../internal/controller/is-rtl.js'; import { @@ -91,9 +91,17 @@ 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" + * (default). + */ @property() type: FormSubmitterType = 'submit'; - @property() value = ''; + /** + * The value added to a form with the button's name when the button submits a + * form. + */ + @property({reflect: true}) value = ''; get name() { return this.getAttribute('name') ?? '';