feat: add slot for trigger button in <datepicker-with-range> component
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
kolaente 2022-02-05 20:29:57 +01:00
parent ccd8602bfd
commit c41397f5db
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 5 additions and 3 deletions

View File

@ -2,9 +2,11 @@
<div class="datepicker-with-range-container">
<popup>
<template #trigger="{toggle}">
<x-button @click.prevent.stop="toggle()" type="secondary" :shadow="false" class="mb-2">
{{ $t('task.show.select') }}
</x-button>
<slot name="trigger" :toggle="toggle">
<x-button @click.prevent.stop="toggle()" type="secondary" :shadow="false" class="mb-2">
{{ $t('task.show.select') }}
</x-button>
</slot>
</template>
<template #content="{isOpen}">
<div class="datepicker-with-range" :class="{'is-open': isOpen}">