How to use the @zendeskgarden/container-selection.composeEventHandlers function in @zendeskgarden/container-selection

To help you get started, we’ve selected a few @zendeskgarden/container-selection examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zendeskgarden / react-components / packages / dropdowns / src / Fields / Label.tsx View on Github external
({ 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;
github zendeskgarden / react-components / packages / dropdowns / src / Fields / Label.tsx View on Github external
({ 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;

@zendeskgarden/container-selection

Containers relating to selection in the Garden Design System

Apache-2.0
Latest version published 2 months ago

Package Health Score

81 / 100
Full package analysis