import { Box } from '@invoke-ai/ui-library'; import { memo, useMemo } from 'react'; type Props = { isSelected: boolean; isHovered: boolean; }; const SelectionOverlay = ({ isSelected, isHovered }: Props) => { const shadow = useMemo(() => { if (isSelected && isHovered) { return 'nodeHoveredSelected'; } if (isSelected) { return 'nodeSelected'; } if (isHovered) { return 'nodeHovered'; } return undefined; }, [isHovered, isSelected]); return ( ); }; export default memo(SelectionOverlay);