ConceptPortal-public/rsconcept/frontend/src/features/oss/components/operation-tooltip.tsx

23 lines
671 B
TypeScript
Raw Normal View History

2025-03-12 12:04:50 +03:00
import { Tooltip } from '@/components/container';
2025-02-26 20:35:16 +03:00
import { globalIDs } from '@/utils/constants';
2025-03-12 11:55:43 +03:00
import { useOperationTooltipStore } from '../stores/operation-tooltip';
2025-02-26 20:35:16 +03:00
2025-03-12 11:55:43 +03:00
import { InfoOperation } from './info-operation';
2025-02-26 20:35:16 +03:00
export function OperationTooltip() {
const hoverOperation = useOperationTooltipStore(state => state.activeOperation);
return (
<Tooltip
2025-02-27 14:01:02 +03:00
clickable
2025-02-26 20:35:16 +03:00
id={globalIDs.operation_tooltip}
layer='z-topmost'
2025-03-10 16:02:53 +03:00
className='max-w-140 dense'
2025-02-27 14:01:02 +03:00
style={{ maxHeight: '30rem', overflowY: 'auto' }}
2025-02-26 20:35:16 +03:00
hidden={!hoverOperation}
>
{hoverOperation ? <InfoOperation operation={hoverOperation} /> : null}
</Tooltip>
);
}