@@ -15,11 +15,12 @@ import {announce} from '@react-aria/live-announcer';
1515import { CloseButton } from './CloseButton' ;
1616import { ContextValue , SlotProps } from 'react-aria-components' ;
1717import { createContext , ForwardedRef , forwardRef , ReactElement , ReactNode , RefObject , useCallback , useEffect , useMemo , useRef , useState } from 'react' ;
18- import { DOMRef , DOMRefValue , Key } from '@react-types/shared' ;
18+ import { DOMProps , DOMRef , DOMRefValue , Key } from '@react-types/shared' ;
1919import { FocusScope , useKeyboard } from 'react-aria' ;
2020// @ts -ignore
2121import intlMessages from '../intl/*.json' ;
2222import { lightDark , style } from '../style' with { type : 'macro' } ;
23+ import { StyleProps } from './style-utils' with { type : 'macro' } ;
2324import { useControlledState } from '@react-stately/utils' ;
2425import { useDOMRef } from '@react-spectrum/utils' ;
2526import { useEnterAnimation , useExitAnimation , useObjectRef , useResizeObserver } from '@react-aria/utils' ;
@@ -74,7 +75,7 @@ const actionBarStyles = style({
7475 }
7576} ) ;
7677
77- export interface ActionBarProps extends SlotProps {
78+ export interface ActionBarProps extends SlotProps , StyleProps , DOMProps {
7879 /** A list of ActionButtons to display. */
7980 children : ReactNode ,
8081 /** Whether the ActionBar should be displayed with a emphasized style. */
@@ -106,7 +107,8 @@ export const ActionBar = forwardRef(function ActionBar(props: ActionBarProps, re
106107} ) ;
107108
108109const ActionBarInner = forwardRef ( function ActionBarInner ( props : ActionBarProps & { isExiting : boolean } , ref : ForwardedRef < HTMLDivElement | null > ) {
109- let { isEmphasized, selectedItemCount = 0 , children, onClearSelection, isExiting} = props ;
110+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
111+ let { isEmphasized, selectedItemCount = 0 , children, onClearSelection, isExiting, slot, ...otherProps } = props ;
110112 let stringFormatter = useLocalizedStringFormatter ( intlMessages , '@react-spectrum/s2' ) ;
111113
112114 // Store the last count greater than zero so that we can retain it while rendering the fade-out animation.
@@ -158,6 +160,7 @@ const ActionBarInner = forwardRef(function ActionBarInner(props: ActionBarProps
158160 < FocusScope restoreFocus >
159161 < div
160162 ref = { objectRef }
163+ { ...otherProps }
161164 { ...keyboardProps }
162165 className = { actionBarStyles ( { isEmphasized, isInContainer : ! ! scrollRef , isEntering, isExiting} ) }
163166 style = { { insetInlineEnd : `calc(var(--insetEnd) + ${ scrollbarWidth } px)` } } >
0 commit comments