How to use the reakit-utils/usePipe.usePipe function in reakit-utils

To help you get started, we’ve selected a few reakit-utils 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 reakit / reakit / packages / reakit / src / Dialog / Dialog.tsx View on Github external
);
            return;
          }
          event.stopPropagation();
          options.hide();
        }
      },
      [options.hideOnEsc, options.hide]
    );

    return {
      ref: mergeRefs(dialog, htmlRef),
      role: "dialog",
      tabIndex: -1,
      onKeyDown: useAllCallbacks(onKeyDown, htmlOnKeyDown),
      unstable_wrap: usePipe(wrap, portalWrap, htmlWrap),
      "aria-modal": options.modal ? true : undefined,
      "data-dialog": true,
      ...htmlProps
    };
  }
});
github reakit / reakit / packages / reakit / src / Tooltip / Tooltip.tsx View on Github external
options,
    { ref: htmlRef, style: htmlStyle, unstable_wrap: htmlWrap, ...htmlProps }
  ) {
    const wrap = React.useCallback(
      (children: React.ReactNode) => {children},
      []
    );
    return {
      ref: mergeRefs(options.unstable_popoverRef, htmlRef),
      role: "tooltip",
      style: {
        ...options.unstable_popoverStyles,
        pointerEvents: "none",
        ...htmlStyle
      },
      unstable_wrap: usePipe(wrap, htmlWrap),
      ...htmlProps
    };
  }
});
github reakit / reakit / packages / reakit / src / Form / FormRadioGroup.tsx View on Github external
rover.currentId,
      rover.unstable_pastId
    ]);

    const wrap = React.useCallback(
      (children: React.ReactNode) => (
        
          {children}
        
      ),
      [providerValue]
    );

    return {
      role: "radiogroup",
      unstable_wrap: usePipe(wrap, htmlWrap),
      ...htmlProps
    };
  }
}) as >(
github reakit / reakit / packages / reakit / src / Menu / MenuBar.tsx View on Github external
useProps(
    options,
    { ref: htmlRef, unstable_wrap: htmlWrap, role = "menubar", ...htmlProps }
  ) {
    const ref = React.useRef(null);
    const wrap = useMenuContext(ref, role, options);

    useShortcuts(ref, options);

    return {
      ref: mergeRefs(ref, htmlRef),
      role,
      "aria-orientation": options.orientation,
      unstable_wrap: usePipe(wrap, htmlWrap),
      ...htmlProps
    };
  }
});