UNPKG

@hakit/components

Version:
63 lines (62 loc) 1.44 kB
import { j as t } from "../../../emotion-react-jsx-runtime.browser.esm-Tq_btErF.js"; import { c as p } from "../../../emotion-styled-base.browser.esm-Dyg8Y4aq.js"; import { useHass as i } from "@hakit/core"; import { ErrorBoundary as u } from "react-error-boundary"; import { f as S, B as f } from "../../../ThemeControlsModal-DWBaJmrH.js"; const y = /* @__PURE__ */ p(f, process.env.NODE_ENV === "production" ? { target: "e16wpwvj0" } : { target: "e16wpwvj0", label: "StyledSensorCard" })(); function C({ entity: r, className: e, cssStyles: o, hideToggle: s = !0, service: a, serviceData: n, ...l }) { const { useStore: d } = i(), c = d((m) => m.globalComponentStyles); return /* @__PURE__ */ t( y, { disableActiveState: !0, hideToggle: s, service: a, serviceData: n, graph: { entity: r, // content spacing is 1rem, so we offset it here by the same amount adjustGraphSpaceBy: "1rem" }, entity: r, className: `sensor-card ${e ?? ""}`, cssStyles: ` ${c?.sensorCard ?? ""} ${o ?? ""} `, ...l } ); } function w(r) { const e = { xxs: 12, xs: 6, sm: 6, md: 4, lg: 4, xlg: 3 }; return /* @__PURE__ */ t(u, { ...S({ prefix: "SensorCard" }), children: /* @__PURE__ */ t(C, { ...e, ...r }) }); } export { w as SensorCard }; //# sourceMappingURL=index.js.map