How to use the multishift.Type.ControlledMenu function in multishift

To help you get started, we’ve selected a few multishift 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 ifiokjr / remirror / @remirror / editor-social / src / components / emoji-suggestion-component.tsx View on Github external
export const EmojiSuggestions: FunctionComponent = ({
  data,
  highlightedIndex,
  command,
}) => {
  const { sxx } = useRemirrorTheme();
  const { view, getPositionerProps } = useRemirrorContext();
  const { getMenuProps, getItemProps, itemHighlightedAtIndex, hoveredIndex } = useMultishift({
    highlightedIndexes: [highlightedIndex],
    type: Type.ControlledMenu,
    items: data,
    isOpen: true,
  });

  const positionerProps = getPositionerProps({
    ...popupMenuPositioner,
    positionerId: 'emojiPopupMenu',
    refKey: 'ref',
  });

  const { top, left, ref } = positionerProps;

  return (

multishift

A repurposed downshift for internal use within remirror

MIT
Latest version published 12 months ago

Package Health Score

82 / 100
Full package analysis