@arcgis/map-components
Version:
ArcGIS Map Components
25 lines (24 loc) • 1.24 kB
TypeScript
/// <reference types="@arcgis/core/interfaces.d.ts" />
import { default as ActionButton } from '@arcgis/core/support/actions/ActionButton.js';
import { default as ActionToggle } from '@arcgis/core/support/actions/ActionToggle.js';
import { JsxNode } from '@arcgis/lumina';
export type IconName = HTMLCalciteIconElement["icon"];
export type Action = {
icon?: string | undefined;
className?: string | undefined;
image?: string | undefined;
indicator?: boolean;
uid?: string;
} & (ActionButton | ActionToggle);
export type Actions = __esri.Collection<Action>;
export type Sections = __esri.Collection<Actions>;
export type VisibilityAppearance = "checkbox" | "default";
/**
* A convenience helper method for rendering a `calcite-action` component.
* Commonly-changed properties such as key, title, and callback are configurable.
*
* @return A `calcite-action` component if the action is visible, else `null`.
*/
export declare function renderAction(action: Action, props: Partial<HTMLCalciteActionElement>, children?: JsxNode[]): JsxNode;
export declare function getActionIcon(action: Partial<Action>): IconName | undefined;
export declare function getActionStyles(image: string | null): Partial<CSSStyleDeclaration>;