fleet/frontend/pages/SoftwarePage/components/IconCell/IconCell.tsx
Gabriel Hernandez b74b607877
Update UI on software title details page for software packages (#18763)
relates to #18327

implements UI on software title details page to supports the new
software packages feature. This includes

**new software package card on the software titles details page: **


![image](https://github.com/fleetdm/fleet/assets/1153709/ade997db-dc43-428e-a50d-0e3b8b9a045b)

**various modal for the package actions:**


![image](https://github.com/fleetdm/fleet/assets/1153709/a82df061-5bb7-40e0-9fb6-d96ea0da91e9)


![image](https://github.com/fleetdm/fleet/assets/1153709/9346bf46-5be4-4684-ab42-58f0a3089145)

**ability to download the software package from download icon**

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [x] Manual QA for all new/changed functionality
2024-05-09 14:06:58 +01:00

44 lines
1 KiB
TypeScript

import React from "react";
import ReactTooltip from "react-tooltip";
import { uniqueId } from "lodash";
import Icon from "components/Icon";
import { COLORS } from "styles/var/colors";
import { IconNames } from "components/icons";
const baseClass = "icon-cell";
interface IIconCellProps {
iconName: IconNames;
}
const IconCell = ({ iconName }: IIconCellProps) => {
const tooltipID = uniqueId();
return (
<div className={baseClass}>
<span
className={`${baseClass}__icon tooltip tooltip__tooltip-icon`}
data-tip
data-for={tooltipID}
data-tip-disable={false}
>
<Icon name={iconName} />
</span>
<ReactTooltip
place="top"
effect="solid"
backgroundColor={COLORS["tooltip-bg"]}
id={tooltipID}
data-html
>
<span className={`tooltip__tooltip-text`}>
{/* TODO: enhance to be dynmaic */}
Software can be installed on Host details page.
</span>
</ReactTooltip>
</div>
);
};
export default IconCell;