feature: update popover component
This commit is contained in:
parent
976fac55e1
commit
c409b355fe
|
@ -18,7 +18,7 @@ export default defineComponent({
|
|||
<>
|
||||
<div class="popover-arrow arrow"></div>
|
||||
{shouldShowTitle.value && <h3 class="popover-title popover-header">{props.title}</h3>}
|
||||
<div class={popoverContainerClass.value}></div>
|
||||
<div class={popoverContainerClass.value}>{context.slots.default && context.slots?.default()}</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
import { ExtractPropTypes } from 'vue';
|
||||
import { ExtractPropTypes, PropType } from 'vue';
|
||||
|
||||
export type PopoverPosition = 'top' | 'bottom' | 'left' | 'right' | 'auto';
|
||||
|
||||
export const popoverProps = {
|
||||
title: { type: String },
|
||||
position: { type: String as PropType<PopoverPosition>, default: 'top' },
|
||||
};
|
||||
|
||||
export type PopoverProps = ExtractPropTypes<typeof popoverProps>;
|
||||
|
|
Loading…
Reference in New Issue