@hakit/components
Version:
A series of components to work with @hakit/core
23 lines • 1.48 kB
TypeScript
import { ReactNode } from 'react';
import { EntityName, FilterByDomain } from '@hakit/core';
import { AlarmControlsProps } from '../..';
import { ButtonCardProps } from '../ButtonCard';
type OmitProperties = "title" | "entity" | "as";
type Extendable<E extends FilterByDomain<EntityName, "alarm_control_panel">> = Omit<ButtonCardProps<E>, OmitProperties>;
export interface AlarmCardProps<E extends FilterByDomain<EntityName, "alarm_control_panel">> extends Extendable<E> {
/** the alarm entity to control */
entity: E;
/** overwrite the default actions that are displayed, by default it will show what's supported by the entity */
states?: AlarmControlsProps["states"];
/** title used in the card for the name of the entity and the modal */
title?: ReactNode;
/** default code for the feature buttons to appear, this does not flow throw to the modal, to use the default code in the modal use modalProps.defaultCode @default undefined */
defaultCode?: number;
}
/**
The AlarmCard is a wrapper for the ButtonCard which automates the "features" at the bottom of the card when there's a defaultCode added to the entity.
Long pressing on the card will open the popup which will include a keypad to enter in the security code
* */
export declare function AlarmCard<E extends FilterByDomain<EntityName, "alarm_control_panel">>(props: AlarmCardProps<E>): import("@emotion/react/jsx-runtime").JSX.Element;
export {};
//# sourceMappingURL=index.d.ts.map