Files
helm-dashboard/frontend/src/components/InstalledPackages/InstalledPackagesHeader.tsx
yuri-sakharov 7572f00f7c Huge bump of versions + husky + fixed DropDown key issue and pointer (#628)
* Bump lint-staged

* Check

* Check

* Added husky

* Check

* Check

* Check

* Check

* Check

* Check

* Check

* Check

* Fix husky

* Used * instead **/* in lint-staged

* Bump tailwindcss and related

* Added @tailwindcss/vite and removed postcss

* Added lint into staged

* Bump @babel/core and updated .prettierignore

* Removed tailwind.config.cjs

* Added ThemeInit

* Added cursor-pointer to Help dropdown

* Bump react-router

* Removed @types/uuid and react-router-dom

* Bump diff2html, prettier, @typescript-eslint/eslint-plugin, @typescript-eslint/parser

* removed vite-plugin-html-config and @babel/core

* removed "@eslint/eslintrc" and "@eslint/js"

* Removed redundant link

* Returned plugins and source to index.css

* Set dark to false in tailwindcss

* Fixed storybook

* Fixed useGetLatestVersion with correct gcTime: 0 option

* Added eslint-plugin-prettier

* Removed spaces

* ClustersList.tsx improved and type fixes for another files

* Repository.tsx improved

* Huge fix of types

* Huge fix of types missed

* Fixed type of SingleValue

* Added cursor pointer
2025-11-29 16:49:51 +00:00

52 lines
1.6 KiB
TypeScript

import HeaderLogo from "../../assets/packges-header.svg";
import { Release } from "../../data/types";
type InstalledPackagesHeaderProps = {
filteredReleases?: Release[];
setFilterKey: React.Dispatch<React.SetStateAction<string>>;
isLoading: boolean;
};
export default function InstalledPackagesHeader({
filteredReleases,
setFilterKey,
isLoading,
}: InstalledPackagesHeaderProps) {
const numOfPackages = filteredReleases?.length;
const showNoPackageAlert = Boolean(
!isLoading && (numOfPackages === undefined || numOfPackages === 0)
);
return (
<div className="custom-shadow rounded-t-md ">
<div className="flex items-center justify-between bg-white px-2 py-0.5 font-inter rounded-t-md ">
<div className="flex items-center">
<img
src={HeaderLogo}
alt="Helm-DashBoard"
className="display-inline h-12 ml-3 mr-3 w-[28px] "
/>
<h2 className="display-inline font-bold text-base ">{`Installed Charts (${
numOfPackages || "0"
})`}</h2>
</div>
<div className="w-1/3">
<input
className="border-installed-charts-filter rounded-sm p-1 text-sm w-11/12"
placeholder="Filter..."
type="text"
onChange={(ev) => setFilterKey(ev.target.value)}
/>
</div>
</div>
{showNoPackageAlert && (
<div className="bg-white rounded-sm shadow-sm display-none no-charts mt-3 text-sm p-4">
Looks like you don&apos;t have any charts installed.
&quot;Repository&quot; section may be a good place to start.
</div>
)}
</div>
);
}