Skip to content

Commit

Permalink
fix(comp:modal): header size should be sm when header has no content (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
sallerli1 committed Aug 11, 2023
1 parent 73eab86 commit ca74b62
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/components/modal/src/ModalWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@ export default defineComponent({
const okButton = { size: 'md', ...props.okButton } as const
const cancelButton = { size: 'md', ...props.cancelButton } as const

const headerSlots = {
header: slots.header,
closeIcon: slots.closeIcon,
}

return (
<div
v-show={mergedVisible.value}
Expand Down Expand Up @@ -181,11 +186,11 @@ export default defineComponent({
<div ref={contentRef} class={`${prefixCls}-content`}>
<ɵHeader
ref={headerRef}
v-slots={slots}
v-slots={headerSlots}
closable={closable.value}
closeIcon={closeIcon.value}
header={props.header}
size={props.type === 'default' ? 'md' : 'sm'}
size={props.header ? 'md' : 'sm'}
onClose={close}
/>
<ModalBody></ModalBody>
Expand Down

0 comments on commit ca74b62

Please sign in to comment.