mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-07 18:09:47 +00:00
Always show compact header for dashboards (#26706)
This commit is contained in:
24
src/dialogs/dialog-list-items/show-list-items-dialog.ts
Normal file
24
src/dialogs/dialog-list-items/show-list-items-dialog.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
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,
|
||||
});
|
||||
Reference in New Issue
Block a user