MCPcopy Create free account
hub / github.com/adobe/react-spectrum / mergeDialogContext

Function mergeDialogContext

packages/react-aria-components/src/Modal.tsx:353–365  ·  view source on GitHub ↗
(
  context: ContextValue<DialogProps, HTMLElement>,
  props: Partial<DialogProps>
)

Source from the content-addressed store, hash-verified

351}
352
353function mergeDialogContext(
354 context: ContextValue<DialogProps, HTMLElement>,
355 props: Partial<DialogProps>
356): ContextValue<DialogProps, HTMLElement> {
357 if (context && 'slots' in context && context.slots) {
358 let slots = {};
359 for (let key in context.slots) {
360 slots[key] = {...context.slots[key], ...props};
361 }
362 return {...context, slots};
363 }
364 return {...context, ...props};
365}
366
367interface ModalContentProps
368 extends RenderProps<ModalRenderProps>, GlobalDOMAttributes<HTMLDivElement> {

Callers 1

ModalOverlayInnerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected