Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

645 B
Raw Blame
"use client";

import { useColorMode } from "@/hooks/use-color-mode";
import { CommonWidgetProps, WidgetCard } from "./card";
import clsx from "clsx";

export const EntityStateWidget = ({ className }: CommonWidgetProps) => {
  const colorMode = useColorMode();

  return (
    <WidgetCard
      width={1}
      className={clsx("text-center", className)}
      onClick={() => colorMode.setColorMode(colorMode.isDarkTheme ? "light" : "dark")}
    >
      <span className="text-sm font-bold">Lights</span>
      <span className="text-sm dark:hidden">ON</span>
      <span className="hidden text-sm dark:inline">OFF</span>
    </WidgetCard>
  );
};