import clsx from 'clsx'; import ReactTooltip from 'react-tooltip'; import { isLimitedToBE } from '@/portainer/feature-flags/feature-flags.service'; import { Icon } from '@/react/components/Icon'; import './BoxSelectorItem.css'; import { BoxSelectorOption } from './types'; interface Props { radioName: string; option: BoxSelectorOption; onChange(value: T, limitedToBE: boolean): void; selectedValue: T; disabled?: boolean; tooltip?: string; } export function BoxSelectorItem({ radioName, option, onChange, selectedValue, disabled, tooltip, }: Props) { const limitedToBE = isLimitedToBE(option.feature); const tooltipId = `box-selector-item-${radioName}-${option.id}`; return (
onChange(option.value, limitedToBE)} /> {tooltip && ( {tooltip} )}
); }