ConceptPortal-public/rsconcept/frontend/src/features/rsform/components/constituenta-tooltip.tsx
2025-03-12 12:04:50 +03:00

16 lines
579 B
TypeScript

import { Tooltip } from '@/components/container';
import { globalIDs } from '@/utils/constants';
import { useCstTooltipStore } from '../stores/cst-tooltip';
import { InfoConstituenta } from './info-constituenta';
export function ConstituentaTooltip() {
const hoverCst = useCstTooltipStore(state => state.activeCst);
return (
<Tooltip clickable id={globalIDs.constituenta_tooltip} layer='z-topmost' className='max-w-120' hidden={!hoverCst}>
{hoverCst ? <InfoConstituenta data={hoverCst} onClick={event => event.stopPropagation()} /> : null}
</Tooltip>
);
}