mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
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: **  **various modal for the package actions:**   **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
44 lines
1 KiB
TypeScript
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;
|