@difizen/mana-core
Version:
38 lines • 1.43 kB
TypeScript
/// <reference types="react" />
import type { Event } from '@difizen/mana-common';
import { Emitter } from '@difizen/mana-common';
import { ToolbarNode } from './toolbar-protocol';
import type { ToolbarItem } from './toolbar-protocol';
export declare class DefaultToolbarItem implements ToolbarItem {
readonly id: string;
readonly command: string;
source: ToolbarNode;
meta?: Record<string, any> | undefined;
readonly extra?: boolean | undefined;
readonly showLabelInline?: boolean | undefined;
readonly order?: string | undefined;
readonly group?: string | string[] | undefined;
protected disposedEventEmitter: Emitter<void>;
onDisposed: Event<void>;
/**
* Optional label for the item.
*/
readonly label?: React.ReactNode | React.FC;
/**
* Optional tooltip for the item.
*/
readonly tooltip?: React.ReactNode | React.FC;
/**
* Optional icon for the item.
*/
readonly icon?: React.ReactNode | React.FC;
readonly execute?: ((...args: any[]) => any) | undefined;
readonly isEnabled?: ((...args: any[]) => boolean) | undefined;
readonly isVisible?: ((...args: any[]) => boolean) | undefined;
readonly isActive?: ((...args: any[]) => boolean) | undefined;
item: ToolbarNode;
constructor(item: ToolbarNode);
disposed?: boolean | undefined;
dispose(): void;
}
//# sourceMappingURL=default-toolbar-item.d.ts.map