/** * DevExtreme (ui/button.d.ts) * Version: 21.1.7 * Build date: Thu Aug 07 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ import { UserDefinedElement, DxElement, } from '../core/element'; import { template, } from '../core/templates/template'; import { EventInfo, NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, } from '../events/index'; import Widget, { WidgetOptions, } from './widget/ui.widget'; /** @public */ export type ClickEvent = NativeEventInfo & { validationGroup?: any; }; /** @public */ export type ContentReadyEvent = EventInfo; /** @public */ export type DisposingEvent = EventInfo; /** @public */ export type InitializedEvent = InitializedEventInfo; /** @public */ export type OptionChangedEvent = EventInfo & ChangedOptionInfo; /** @public */ export type TemplateData = { readonly text?: string; readonly icon?: string; }; /** * @deprecated use Properties instead * @namespace DevExpress.ui */ export interface dxButtonOptions extends WidgetOptions { /** * @docid * @default true * @public */ activeStateEnabled?: boolean; /** * @docid * @default true &for(desktop) * @public */ focusStateEnabled?: boolean; /** * @docid * @default true * @public */ hoverStateEnabled?: boolean; /** * @docid * @default "" * @public */ icon?: string; /** * @docid * @default null * @type_function_param1 e:object * @type_function_param1_field4 event:event * @type_function_param1_field5 validationGroup:object * @type_function_param1_field1 component:dxButton * @type_function_param1_field2 element:DxElement * @type_function_param1_field3 model:any * @action * @public */ onClick?: ((e: ClickEvent) => void); /** * @docid * @type Enums.ButtonStylingMode * @default 'contained' * @public */ stylingMode?: 'text' | 'outlined' | 'contained'; /** * @docid * @default "content" * @type_function_param1 buttonData:object * @type_function_param1_field1 text:string * @type_function_param1_field2 icon:string * @type_function_return string|Element|jQuery * @public */ template?: template | ((data: TemplateData, contentElement: DxElement) => string | UserDefinedElement); /** * @docid * @default "" * @public */ text?: string; /** * @docid * @type Enums.ButtonType * @default 'normal' * @public */ type?: 'back' | 'danger' | 'default' | 'normal' | 'success'; /** * @docid * @default false * @public */ useSubmitBehavior?: boolean; /** * @docid * @default undefined * @public */ validationGroup?: string; } /** * @docid * @inherits Widget * @hasTranscludedContent * @namespace DevExpress.ui * @public */ export default class dxButton extends Widget { constructor(element: UserDefinedElement, options?: dxButtonOptions) } /** @public */ export type Properties = dxButtonOptions; /** @deprecated use Properties instead */ export type Options = dxButtonOptions; /** @deprecated use Properties instead */ export type IOptions = dxButtonOptions;