feat: add tooltip for held packages

This commit is contained in:
arcanis committed 2026-10-16 13:09:17 +03:00
1 parent ef47c6fa72
commit 0b371b3e77
1 file changed
+14 -11
+14 -11
View File
@@ -18,7 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
import PauseCircleIcon from "@mui/icons-material/PauseCircle"; import PauseCircleIcon from "@mui/icons-material/PauseCircle";
import { Chip } from "@mui/material"; import { Chip, Tooltip } from "@mui/material";
import type { BuildStatus } from "models/BuildStatus"; import type { BuildStatus } from "models/BuildStatus";
import type React from "react"; import type React from "react";
import { StatusColors } from "theme/StatusColors"; import { StatusColors } from "theme/StatusColors";
@@ -29,14 +29,17 @@ interface StatusCellProps {
} }
export default function StatusCell({ isHeld, status }: StatusCellProps): React.JSX.Element { export default function StatusCell({ isHeld, status }: StatusCellProps): React.JSX.Element {
return <Chip return <Tooltip title={isHeld ? "Held: automatic updates are skipped" : ""}>
icon={isHeld ? <PauseCircleIcon /> : undefined} <Chip
label={status} aria-label={isHeld ? `${status}; held: automatic updates are skipped` : status}
size="small" icon={isHeld ? <PauseCircleIcon /> : undefined}
sx={{ label={status}
backgroundColor: StatusColors[status], size="small"
color: "common.white", sx={{
fontWeight: 500, backgroundColor: StatusColors[status],
}} color: "common.white",
/>; fontWeight: 500,
}}
/>
</Tooltip>;
} }