MCPcopy Create free account
hub / github.com/adobe/react-spectrum / ListBoxDropIndicator

Function ListBoxDropIndicator

packages/react-aria-components/src/ListBox.tsx:691–715  ·  view source on GitHub ↗
(props: ListBoxDropIndicatorProps, ref: ForwardedRef<HTMLElement>)

Source from the content-addressed store, hash-verified

689}
690
691function ListBoxDropIndicator(props: ListBoxDropIndicatorProps, ref: ForwardedRef<HTMLElement>) {
692 let {dropIndicatorProps, isDropTarget, ...otherProps} = props;
693
694 let renderProps = useRenderProps({
695 ...otherProps,
696 defaultClassName: 'react-aria-DropIndicator',
697 values: {
698 isDropTarget
699 }
700 });
701
702 return (
703 <>
704 {/* oxlint-disable jsx-a11y/role-has-required-aria-props -- drop indicator is not selectable */}
705 <dom.div
706 {...dropIndicatorProps}
707 {...renderProps}
708 role="option"
709 ref={ref as RefObject<HTMLDivElement | null>}
710 data-drop-target={isDropTarget || undefined}
711 />
712 {/* oxlint-enable jsx-a11y/role-has-required-aria-props */}
713 </>
714 );
715}
716
717const ListBoxDropIndicatorForwardRef = forwardRef(ListBoxDropIndicator);
718

Callers

nothing calls this directly

Calls 1

useRenderPropsFunction · 0.90

Tested by

no test coverage detected