diff --git a/packages/@react-spectrum/s2/src/Breadcrumbs.tsx b/packages/@react-spectrum/s2/src/Breadcrumbs.tsx index d00b5447c8b..4728d047926 100644 --- a/packages/@react-spectrum/s2/src/Breadcrumbs.tsx +++ b/packages/@react-spectrum/s2/src/Breadcrumbs.tsx @@ -19,6 +19,7 @@ import {focusRing, getAllowedOverrides, StyleProps} from './style-utils' with {t import {forwardRefType} from './types'; import {size, style} from '../style/spectrum-theme' with { type: 'macro' }; import {useDOMRef} from '@react-spectrum/utils'; +import {useSpectrumContextProps} from './useSpectrumContextProps'; interface BreadcrumbsStyleProps { /** @@ -42,7 +43,7 @@ export interface BreadcrumbsProps extends Omit, 'chil children?: ReactNode } -export const BreadcrumbsContext = createContext, DOMRefValue>>(null); +export const BreadcrumbsContext = createContext, DOMRefValue>>(null); const wrapper = style({ display: 'flex', @@ -71,6 +72,7 @@ const wrapper = style({ }, getAllowedOverrides()); function Breadcrumbs(props: BreadcrumbsProps, ref: DOMRef) { + [props, ref] = useSpectrumContextProps(props, ref, BreadcrumbsContext); let { UNSAFE_className = '', UNSAFE_style,