github.com/turbot/steampipe@v1.7.0-rc.0.0.20240517123944-7cef272d4458/ui/dashboard/src/components/DashboardHeader/SteampipeLogo.tsx (about)

     1  import { getComponent } from "../dashboards";
     2  // @ts-ignore
     3  import { ReactComponent as Logo } from "./logos/steampipe-logo.svg";
     4  // @ts-ignore
     5  import { ReactComponent as LogoWordmarkColor } from "./logos/steampipe-logo-wordmark-color.svg";
     6  // @ts-ignore
     7  import { ReactComponent as LogoWordmarkDark } from "./logos/steampipe-logo-wordmark-darkmode.svg";
     8  import { ThemeNames } from "../../hooks/useTheme";
     9  import { useDashboard } from "../../hooks/useDashboard";
    10  
    11  const SteampipeLogo = () => {
    12    const {
    13      themeContext: { theme },
    14    } = useDashboard();
    15    const ExternalLink = getComponent("external_link");
    16  
    17    return (
    18      <div className="mr-1 md:mr-4">
    19        <ExternalLink ignoreDataMode to="/">
    20          <div className="block md:hidden w-8">
    21            <Logo />
    22          </div>
    23          <div className="hidden md:block w-48">
    24            {theme.name === ThemeNames.STEAMPIPE_DEFAULT && <LogoWordmarkColor />}
    25            {theme.name === ThemeNames.STEAMPIPE_DARK && <LogoWordmarkDark />}
    26          </div>
    27        </ExternalLink>
    28      </div>
    29    );
    30  };
    31  
    32  export default SteampipeLogo;