@hakit/components
Version:
A series of components to work with @hakit/core
25 lines • 1.44 kB
TypeScript
import { EntityName, ExtractDomain, HassEntityWithService } from '@hakit/core';
import { IconProps } from '@iconify/react';
import { ModalPropsHelper } from '../..';
import { ReactNode } from 'react';
export interface EntitiesCardRowProps<E extends EntityName> extends Omit<React.ComponentPropsWithoutRef<"div">, "onClick"> {
/** The name of the entity to render */
entity: E;
/** the icon name to use @default entity_icon */
icon?: string;
/** the props for the icon, which includes styles for the icon */
iconProps?: Omit<IconProps, "icon">;
/** the name of the entity @default friendly_name */
name?: ReactNode;
/** the function to call when the row is clicked @default undefined */
onClick?: (entity: HassEntityWithService<ExtractDomain<E>>) => void;
/** the function to render the state @default undefined */
renderState?: (entity: HassEntityWithService<ExtractDomain<E>>) => React.ReactElement<HTMLElement>;
/** include last updated time @default false */
includeLastUpdated?: boolean;
/** props to pass to the modal for each row */
modalProps?: Partial<ModalPropsHelper<ExtractDomain<E>>>;
}
/** The EntitiesCardRow component is a child component of the EntitiesCard component. */
export declare function EntitiesCardRow<E extends EntityName>(props: EntitiesCardRowProps<E>): import("@emotion/react/jsx-runtime").JSX.Element;
//# sourceMappingURL=EntitiesCardRow.d.ts.map