mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-10-20 03:37:59 +00:00
feat: add tooltip for held packages
This commit is contained in:
1 parent
ef47c6fa72
commit
0b371b3e77
1 file changed
+14
-11
@@ -18,7 +18,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
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 React from "react";
|
||||
import { StatusColors } from "theme/StatusColors";
|
||||
@@ -29,14 +29,17 @@ interface StatusCellProps {
|
||||
}
|
||||
|
||||
export default function StatusCell({ isHeld, status }: StatusCellProps): React.JSX.Element {
|
||||
return <Chip
|
||||
icon={isHeld ? <PauseCircleIcon /> : undefined}
|
||||
label={status}
|
||||
size="small"
|
||||
sx={{
|
||||
backgroundColor: StatusColors[status],
|
||||
color: "common.white",
|
||||
fontWeight: 500,
|
||||
}}
|
||||
/>;
|
||||
return <Tooltip title={isHeld ? "Held: automatic updates are skipped" : ""}>
|
||||
<Chip
|
||||
aria-label={isHeld ? `${status}; held: automatic updates are skipped` : status}
|
||||
icon={isHeld ? <PauseCircleIcon /> : undefined}
|
||||
label={status}
|
||||
size="small"
|
||||
sx={{
|
||||
backgroundColor: StatusColors[status],
|
||||
color: "common.white",
|
||||
fontWeight: 500,
|
||||
}}
|
||||
/>
|
||||
</Tooltip>;
|
||||
}
|
||||
Reference in new issue
Block a user