import * as React from 'react'; import { DropdownItem, DropdownItemProps } from '../Dropdown'; import { OverflowMenuContext } from './OverflowMenuContext'; export interface OverflowMenuDropdownItemProps extends Omit { /** Indicates when a dropdown item shows and hides the corresponding list item */ isShared?: boolean; /** Identifies the component in the dropdown onSelect callback */ itemId?: string | number; } export const OverflowMenuDropdownItem: React.FunctionComponent = ({ children, isShared = false, itemId, ...additionalProps }: OverflowMenuDropdownItemProps) => ( {(value) => (!isShared || value.isBelowBreakpoint) && ( {children} ) } ); OverflowMenuDropdownItem.displayName = 'OverflowMenuDropdownItem';