UNPKG

@hakit/components

Version:
26 lines 1.28 kB
import { IconProps } from '@iconify/react'; import { CardBaseProps, PreloadImageProps } from '../..'; type OmitProperties = "title" | "as" | "active" | "entity" | "disabled" | "service" | "serviceData" | "onClick" | "active" | "longPressCallback" | "modalProps"; export interface PictureCardProps extends Omit<CardBaseProps<"button">, OmitProperties> { /** an image to provide to the card */ image: string; /** a title of the card */ title: string; /** an optional icon to provide */ icon?: string; /** the props for the icon, which includes styles for the icon */ iconProps?: Omit<IconProps, "icon">; /** an object containing the props to pass to the preloader */ preloadProps?: PreloadImageProps; /** called when the card is pressed */ onClick?: () => void; } /** A simple component to render an image with a title/icon similar to the lovelace picture card, you can also bind a click event to the card, which will also return the entity if provided * @example * <PictureCard entity="group.some_group_of_lights" onClick={(entity) => { * entity.service.toggle(); * }} */ export declare function PictureCard(props: PictureCardProps): import("@emotion/react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=index.d.ts.map