Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
({ onMouseEnter, onMouseLeave, ...other }, ref) => {
const {
downshift: { getLabelProps }
} = useDropdownContext();
const { setIsLabelHovered } = useFieldContext();
const labelProps = getLabelProps({
onMouseEnter: composeEventHandlers(onMouseEnter, () => {
setIsLabelHovered(true);
}),
onMouseLeave: composeEventHandlers(onMouseLeave, () => {
setIsLabelHovered(false);
}),
...other
});
return ;
}
) as React.FunctionComponent;
({ onMouseEnter, onMouseLeave, ...other }, ref) => {
const {
downshift: { getLabelProps }
} = useDropdownContext();
const { setIsLabelHovered } = useFieldContext();
const labelProps = getLabelProps({
onMouseEnter: composeEventHandlers(onMouseEnter, () => {
setIsLabelHovered(true);
}),
onMouseLeave: composeEventHandlers(onMouseLeave, () => {
setIsLabelHovered(false);
}),
...other
});
return ;
}
) as React.FunctionComponent;