| 377 | } |
| 378 | |
| 379 | function mergeDialogContext( |
| 380 | context: ContextValue<DialogProps, HTMLElement>, |
| 381 | props: Partial<DialogProps> |
| 382 | ): ContextValue<DialogProps, HTMLElement> { |
| 383 | if (context && 'slots' in context && context.slots) { |
| 384 | let slots = {}; |
| 385 | for (let key in context.slots) { |
| 386 | slots[key] = {...context.slots[key], ...props}; |
| 387 | } |
| 388 | return {...context, slots}; |
| 389 | } |
| 390 | return {...context, ...props}; |
| 391 | } |
| 392 | |
| 393 | interface ModalContentProps |
| 394 | extends RenderProps<ModalRenderProps>, GlobalDOMAttributes<HTMLDivElement> { |