@awsui/components-react
Version:
On July 19th, 2022, we launched [Cloudscape Design System](https://cloudscape.design). Cloudscape is an evolution of AWS-UI. It consists of user interface guidelines, front-end components, design resources, and development tools for building intuitive, en
52 lines • 1.51 kB
TypeScript
import React from 'react';
import { InternalPosition, PopoverProps } from './interfaces';
interface PopoverContainerProps {
/** References the element the container is positioned against. */
trackRef?: React.RefObject<HTMLElement | SVGElement>;
getTrack?: () => null | HTMLElement | SVGElement;
/**
Used to update the container position in case track or track position changes:
const trackRef = useRef<Element>(null)
return (<>
<Track style={getPosition(selectedItemId)} ref={trackRef} />
<PopoverContainer trackRef={trackRef} trackKey={selectedItemId} .../>
</>)
*/
trackKey?: string | number;
minVisibleBlockSize?: number;
position: PopoverProps.Position;
zIndex?: React.CSSProperties['zIndex'];
arrow: (position: InternalPosition | null) => React.ReactNode;
children: React.ReactNode;
renderWithPortal?: boolean;
size: PopoverProps.Size | 'content';
fixedWidth: boolean;
variant?: 'annotation';
keepPosition?: boolean;
allowScrollToFit?: boolean;
allowVerticalOverflow?: boolean;
hideOnOverscroll?: boolean;
hoverArea?: boolean;
className?: string;
}
export default function PopoverContainer({
position,
trackRef,
getTrack: externalGetTrack,
trackKey,
minVisibleBlockSize,
arrow,
children,
zIndex,
renderWithPortal,
size,
fixedWidth,
variant,
keepPosition,
allowScrollToFit,
allowVerticalOverflow,
hideOnOverscroll,
hoverArea,
className
}: PopoverContainerProps): JSX.Element | null;
export {};