mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-09 02:49:51 +00:00
* WIP new add automation element * WIP new add dialog * revert merge * Add tabs * fix height * Add max-height * Add keybindings and blocks search separation * Fix device translation * fix translations, scroll issues, RTL --------- Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
22 lines
613 B
TypeScript
22 lines
613 B
TypeScript
import { fireEvent } from "../../../common/dom/fire_event";
|
|
|
|
export const PASTE_VALUE = "__paste__";
|
|
|
|
export interface AddAutomationElementDialogParams {
|
|
type: "trigger" | "condition" | "action";
|
|
add: (key: string) => void;
|
|
clipboardItem: string | undefined;
|
|
}
|
|
const loadDialog = () => import("./add-automation-element-dialog");
|
|
|
|
export const showAddAutomationElementDialog = (
|
|
element: HTMLElement,
|
|
dialogParams: AddAutomationElementDialogParams
|
|
): void => {
|
|
fireEvent(element, "show-dialog", {
|
|
dialogTag: "add-automation-element-dialog",
|
|
dialogImport: loadDialog,
|
|
dialogParams,
|
|
});
|
|
};
|