UNPKG

@techolution-ai/computer-vision

Version:

A JavaScript/TypeScript library for computer vision applications, providing tools for image processing, scanning, and MQTT-based messaging.

1 lines 2.4 kB
{"version":3,"sources":["../../../src/scanner/status-item.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { combineClassNames } from '../helpers/utils'\n\nexport interface IStatusItemProps {\n message: string\n icon?: string | React.ReactNode,\n render?:()=>(React.ReactNode | null | undefined),\n slotProps?: {\n root?: React.HtmlHTMLAttributes<HTMLDivElement>\n container?: React.HtmlHTMLAttributes<HTMLDivElement>\n icon?: React.HtmlHTMLAttributes<HTMLImageElement>\n message?: React.HtmlHTMLAttributes<HTMLParagraphElement>\n }\n}\n\nconst StatusItem = ({ message, icon,render,slotProps = {} }: IStatusItemProps) => {\n // use animation here\n const renderStatusItem = render?.();\n return (\n <div\n {...slotProps.root}\n className={combineClassNames('status_root', slotProps.root?.className)}\n >\n {renderStatusItem ? renderStatusItem : (<div\n {...slotProps.container}\n className={combineClassNames(\n 'status_icon_text_container',\n slotProps.container?.className,\n )}\n >\n {icon &&\n (typeof icon === 'string' ? (\n <img\n src={icon}\n {...slotProps.icon}\n style={{ width: 40, height: 40, ...slotProps.icon?.style }}\n />\n ) : (\n icon\n ))}\n <p\n {...slotProps.message}\n className={combineClassNames(\n 'status_message_style',\n slotProps.message?.className,\n )}\n >\n {message}\n </p>\n </div>)}\n </div>\n )\n}\n\nexport default StatusItem\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAkC;AAsBY;AAR9C,IAAM,aAAa,CAAC,EAAE,SAAS,MAAK,QAAO,YAAY,CAAC,EAAE,MAAwB;AAEhF,QAAM,mBAAmB,SAAS;AAClC,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG,UAAU;AAAA,MACd,eAAW,gCAAkB,eAAe,UAAU,MAAM,SAAS;AAAA,MAEpE,6BAAmB,mBAAoB;AAAA,QAAC;AAAA;AAAA,UACtC,GAAG,UAAU;AAAA,UACd,eAAW;AAAA,YACT;AAAA,YACA,UAAU,WAAW;AAAA,UACvB;AAAA,UAEC;AAAA,qBACE,OAAO,SAAS,WACf;AAAA,cAAC;AAAA;AAAA,gBACC,KAAK;AAAA,gBACJ,GAAG,UAAU;AAAA,gBACd,OAAO,EAAE,OAAO,IAAI,QAAQ,IAAI,GAAG,UAAU,MAAM,MAAM;AAAA;AAAA,YAC3D,IAEA;AAAA,YAEJ;AAAA,cAAC;AAAA;AAAA,gBACE,GAAG,UAAU;AAAA,gBACd,eAAW;AAAA,kBACT;AAAA,kBACA,UAAU,SAAS;AAAA,gBACrB;AAAA,gBAEC;AAAA;AAAA,YACH;AAAA;AAAA;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,sBAAQ;","names":[]}