diff --git a/src/components/ui/Drawer/fragments/DrawerContent.tsx b/src/components/ui/Drawer/fragments/DrawerContent.tsx index 95a470d0b..367a3ed16 100644 --- a/src/components/ui/Drawer/fragments/DrawerContent.tsx +++ b/src/components/ui/Drawer/fragments/DrawerContent.tsx @@ -74,7 +74,19 @@ const DrawerContent = forwardRef(({ // Strip floating-ui's style injection — drawer positioning is owned by CSS // eslint-disable-next-line @typescript-eslint/no-unused-vars - const { style: _ignored = undefined, ...floatingProps } = (getFloatingProps() ?? {}) as any; + const { style: _ignored = undefined, ...floatingProps } = (getFloatingProps({ + ...props, + style: { outline: 'none', ...peekStyle, ...styleProp }, + role, + 'aria-modal': resolvedAriaModal, + 'aria-hidden': !isOpen ? 'true' : undefined, + 'aria-labelledby': isOpen ? ariaLabelledBy : undefined, + 'aria-describedby': isOpen ? ariaDescribedBy : undefined, + 'data-state': dataState, + 'data-swipe-direction': swipeDirection, + 'data-child-open': childOpenCount > 0 ? 'true' : undefined, + className: clsx(rootClass && `${rootClass}-content`, className) + }) ?? {}) as Record; if (!isVisible && !forceMount) return null; @@ -99,17 +111,6 @@ const DrawerContent = forwardRef(({ ref={mergedRef} asChild={asChild} {...floatingProps} - style={{ outline: 'none', ...peekStyle, ...styleProp }} - role={role} - aria-modal={resolvedAriaModal} - aria-hidden={!isOpen ? 'true' : undefined} - aria-labelledby={isOpen ? ariaLabelledBy : undefined} - aria-describedby={isOpen ? ariaDescribedBy : undefined} - data-state={dataState} - data-swipe-direction={swipeDirection} - data-child-open={childOpenCount > 0 ? 'true' : undefined} - className={clsx(rootClass && `${rootClass}-content`, className)} - {...props} > {/* Separate handle children from the rest so CSS can position them on the correct edge regardless of flex-direction */}