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

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

View File

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