OptionaldisabledRefuses the option outright: the button renders disabled, and Enter does not activate it as the default. A thunk resolves at render, so a dialog can gate its action on live editor state.
This is for an action that is not OFFERED — a form the user has not made valid yet. It is not ShowOptionsOptions.onValidateOption, which lets the click through and then refuses to close; use that when the reason only emerges from the attempt (a rejected password).
OptionalidStable, language-free identity returned as InputResults.option and compared by callers.
Omit for a display-only button — then the option's own identity is returned (the string form, or
this object by reference). NOT a thunk: an identity must not vary by language.
Button label. A thunk resolves at render, so a mid-dialog language change re-localizes it.
OptionalrenderPer-option custom button render (replaces the former dialog-level createOptionsButton).
One button in an options / input dialog. A bare
stringis shorthand for{ label: string }whose identity is that same string (back-compat).Identity and display are deliberately separate:
labelis what the user SEES — and may be a thunk so a language change while the dialog is open re-localizes it — whileidis the language-free value the caller COMPARES (results.option === 'insert') and never varies. Whether a button is the default (Enter) or the cancel (Esc) is NOT part of the option: that is contextual to the dialog and set by ShowOptionsOptions.defaultOption / ShowOptionsOptions.cancelOption.