Skip to content

Commit 2e31c98

Browse files
committed
fix: update CoachMarkContext and SlottedContextValue types for better prop handling
1 parent 5670b2a commit 2e31c98

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/@react-spectrum/s2/src/CoachMark.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ const actionButtonSize = {
320320
XL: 'L'
321321
} as const;
322322

323-
export const CoachMarkContext = createContext<ContextValue<CoachMarkProps, HTMLElement>>({});
323+
export const CoachMarkContext = createContext<ContextValue<Partial<CoachMarkProps>, HTMLElement>>({});
324324

325325
export const CoachMark = forwardRef((props: CoachMarkProps, ref: ForwardedRef<HTMLElement>) => {
326326
let colorScheme = useContext(ColorSchemeContext);

packages/react-aria-components/src/utils.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ interface SlottedValue<T> {
2020
slots?: Record<string | symbol, T>
2121
}
2222

23-
export type SlottedContextValue<T> = SlottedValue<T> | T | null | undefined;
23+
export type SlottedContextValue<T> = SlottedValue<T> & T | null | undefined;
2424
export type ContextValue<T, E> = SlottedContextValue<WithRef<T, E>>;
2525

2626
type ProviderValue<T> = [Context<T>, T];

0 commit comments

Comments
 (0)