mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-05 09:00:11 +00:00
25 lines
524 B
TypeScript
25 lines
524 B
TypeScript
import { fireEvent } from "../../common/dom/fire_event";
|
|
|
|
interface ListItem {
|
|
icon?: string;
|
|
iconPath?: string;
|
|
label: string;
|
|
description?: string;
|
|
action: () => any;
|
|
}
|
|
|
|
export interface ListItemsDialogParams {
|
|
title?: string;
|
|
items: ListItem[];
|
|
}
|
|
|
|
export const showListItemsDialog = (
|
|
element: HTMLElement,
|
|
params: ListItemsDialogParams
|
|
) =>
|
|
fireEvent(element, "show-dialog", {
|
|
dialogTag: "dialog-list-items",
|
|
dialogImport: () => import("./dialog-list-items"),
|
|
dialogParams: params,
|
|
});
|