diff --git a/src/utils/components/HardwareDevices/HardwareDeviceTitle.tsx b/src/utils/components/HardwareDevices/HardwareDeviceTitle.tsx index a73f0ec1c..1126e4263 100644 --- a/src/utils/components/HardwareDevices/HardwareDeviceTitle.tsx +++ b/src/utils/components/HardwareDevices/HardwareDeviceTitle.tsx @@ -1,4 +1,4 @@ -import * as React from 'react'; +import React, { FC } from 'react'; import { useKubevirtTranslation } from '@kubevirt-utils/hooks/useKubevirtTranslation'; import { Button, DescriptionListTerm } from '@patternfly/react-core'; @@ -7,12 +7,20 @@ import { PencilAltIcon } from '@patternfly/react-icons'; type HardwareDeviceTitleProps = { title: string; canEdit: boolean; + hideEdit?: boolean; onClick?: () => void; }; -const HardwareDeviceTitle: React.FC = ({ title, canEdit, onClick }) => { +const HardwareDeviceTitle: FC = ({ + title, + canEdit, + hideEdit = false, + onClick, +}) => { const { t } = useKubevirtTranslation(); + if (hideEdit) return {title}; + return (