| 351 | } |
| 352 | |
| 353 | function 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 | |
| 367 | interface ModalContentProps |
| 368 | extends RenderProps<ModalRenderProps>, GlobalDOMAttributes<HTMLDivElement> { |