import { MMapComplexEntity, MMapGroupEntity } from "../MMapEnities"; import { overrideKeyReactify } from "../wrappers"; /** * Properties for [[MMapControlCommonButton]] * ```typescript * const button = new MMapControlCommonButton({ * text: 'Click me!', * disabled: false, * color: 'black', * background: 'white', * onClick: () => { * console.log('Button clicked'); * } * }); * ``` */ export type MMapControlCommonButtonProps = { /** On click handler */ onClick?: () => void; /** Should be disabled */ disabled?: boolean; /** Text content */ text?: string; /** Text color */ color?: string; /** Background color */ background?: string; /** HTML element */ element?: HTMLElement; }; export type MMapControlButtonProps = MMapControlCommonButtonProps; /** @module MMapControlButton */ /** * Default control button. Can be used as a base for custom controls. * ```javascript * const map = new mappable.MMap(document.getElementById('map-root'), {...}); * const controls = new mappable.MMapControls({position: 'bottom right'}); * const button = new mappable.MMapControlCommonButton({ * text: 'Click me!', * onClick: () => { * console.log('Button clicked'); * } * }); * controls.addChild(button); * ``` * More about controls: [Mappable Maps API controls](https://mappable.world/docs/js-api/dg/concepts/controls/index.html) */ export declare class MMapControlCommonButton extends MMapGroupEntity { private _element?; private _detachDom?; private _unwatchThemeContext?; protected _onAttach(): void; private _updateElement; protected _onUpdate(props: Partial): void; protected _onDetach(): void; private _updateTheme; } /** * The control element - button. * ```javascript * const map = new MMap(document.getElementById('map-root'), {...}); * const controls = new MMapControls({position: 'top left horizontal'}); * let count = 0; * const button = new MMapControlButton({ * text: 'Click me!', * onClick: () => { * button.update({text: 'Clicked:' + ++count}); * } * }); * controls.addChild(button); * map.addChild(controls); * ``` * * @see */ export declare class MMapControlButton extends MMapComplexEntity { static [overrideKeyReactify]: import("../../reactify/reactify").CustomReactify void) | undefined; disabled?: boolean | undefined; text?: string | undefined; color?: string | undefined; background?: string | undefined; element?: HTMLElement | undefined; children?: import("react").ReactNode; ref?: import("react").Ref>> | undefined; key?: import("react").Key | null | undefined; }>>; private _control; private _button; protected _onAttach(): void; protected _onUpdate(props: Partial): void; protected _onDetach(): void; get text(): string | undefined; }