All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.src.components.Menu.DrilldownMenu.tsx Maven / Gradle / Ivy

Go to download

This library provides a set of common React components for use with the PatternFly reference implementation.

The newest version!
import React from 'react';
import { Menu } from './Menu';
import { MenuContent } from './MenuContent';
import { MenuList } from './MenuList';
import { MenuContext } from './MenuContext';

export interface DrilldownMenuProps extends Omit, 'ref' | 'onSelect'> {
  /** Items within drilldown sub-menu */
  children?: React.ReactNode;
  /** ID of the drilldown sub-menu */
  id?: string;
  /** Flag indicating whether the menu is drilled in */
  isMenuDrilledIn?: boolean;
  /** Optional callback to get the height of the sub menu */
  getHeight?: (height: string) => void;
}

export const DrilldownMenu: React.FunctionComponent = ({
  children,
  id,
  isMenuDrilledIn = false,
  getHeight,
  ...props
}: DrilldownMenuProps) => (
  /* eslint-disable @typescript-eslint/no-unused-vars */
  
    {({ menuId, parentMenu, flyoutRef, setFlyoutRef, disableHover, ...context }) => (
      
        
          {children}
        
      
    )}
  
  /* eslint-enable @typescript-eslint/no-unused-vars */
);

DrilldownMenu.displayName = 'DrilldownMenu';




© 2015 - 2024 Weber Informatics LLC | Privacy Policy