@@ -8,11 +8,13 @@ import clsx from 'clsx';
88import { useMergeRefs , useResizeObserver , useUniqueId } from '@cloudscape-design/component-toolkit/internal' ;
99import { getLogicalBoundingClientRect } from '@cloudscape-design/component-toolkit/internal' ;
1010
11+ import { getBaseProps } from '../internal/base-component' ;
1112import { getFirstFocusable , getLastFocusable } from '../internal/components/focus-lock/utils.js' ;
1213import TabTrap from '../internal/components/tab-trap/index.js' ;
1314import { Transition , TransitionStatus } from '../internal/components/transition' ;
1415import { fireNonCancelableEvent } from '../internal/events' ;
1516import customCssProps from '../internal/generated/custom-css-properties' ;
17+ import { InternalBaseComponentProps } from '../internal/hooks/use-base-component' ;
1618import { useMobile } from '../internal/hooks/use-mobile' ;
1719import { usePortalModeClasses } from '../internal/hooks/use-portal-mode-classes' ;
1820import { useVisualRefresh } from '../internal/hooks/use-visual-mode' ;
@@ -27,7 +29,7 @@ import {
2729import { applyDropdownPositionRelativeToViewport , LogicalDOMRect } from './dropdown-position' ;
2830import { DropdownProps } from './interfaces' ;
2931
30- interface InternalDropdownProps extends DropdownProps {
32+ interface InternalDropdownProps extends DropdownProps , InternalBaseComponentProps {
3133 onMouseDown ?: React . MouseEventHandler ;
3234 contentKey ?: string ;
3335 dropdownId ?: string ;
@@ -210,8 +212,12 @@ const InternalDropdown = ({
210212 ariaLabel,
211213 ariaLabelledby,
212214 ariaDescribedby,
215+ __internalRootRef,
216+ ...restProps
213217} : InternalDropdownProps ) => {
218+ const baseProps = getBaseProps ( restProps ) ;
214219 const wrapperRef = useRef < HTMLDivElement | null > ( null ) ;
220+ const mergedRef = useMergeRefs ( wrapperRef , __internalRootRef ) ;
215221 const triggerRef = useRef < HTMLDivElement | null > ( null ) ;
216222 const dropdownRef = useRef < HTMLDivElement | null > ( null ) ;
217223 const dropdownContainerRef = useRef < HTMLDivElement | null > ( null ) ;
@@ -500,12 +506,14 @@ const InternalDropdown = ({
500506
501507 return (
502508 < div
509+ { ...baseProps }
503510 className = { clsx (
504511 styles . root ,
505512 interior && styles . interior ,
506- stretchTriggerHeight && styles [ 'stretch-trigger-height' ]
513+ stretchTriggerHeight && styles [ 'stretch-trigger-height' ] ,
514+ baseProps . className
507515 ) }
508- ref = { wrapperRef }
516+ ref = { mergedRef }
509517 onFocus = { focusHandler }
510518 onBlur = { blurHandler }
511519 >
0 commit comments