Skip to content

Commit

Permalink
fix(animation): fix Expected Object, got Function on animations props
Browse files Browse the repository at this point in the history
  • Loading branch information
joseacabaneros committed May 28, 2024
1 parent 1bffd7c commit aee5892
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 21 deletions.
13 changes: 3 additions & 10 deletions packages/x-components/src/components/base-dropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,8 @@

<script lang="ts">
import { Identifiable } from '@empathyco/x-types';
import Vue, {
computed,
defineComponent,
nextTick,
onBeforeUnmount,
PropType,
ref,
watch
} from 'vue';
import { computed, defineComponent, nextTick, onBeforeUnmount, PropType, ref, watch } from 'vue';
import { AnimationProp } from '../types';
import { getTargetElement } from '../utils/html';
import { normalizeString } from '../utils/normalize';
import { isInRange } from '../utils/number';
Expand Down Expand Up @@ -123,7 +116,7 @@
* so only `<transition>` components are allowed.
*/
animation: {
type: Object as PropType<string | typeof Vue>,
type: AnimationProp,
default: () => NoElement
},
/** Time to wait without receiving any keystroke before resetting the items search query. */
Expand Down
15 changes: 4 additions & 11 deletions packages/x-components/src/components/modals/base-modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,9 @@
</template>

<script lang="ts">
import Vue, {
defineComponent,
nextTick,
onBeforeUnmount,
onMounted,
PropType,
ref,
watch
} from 'vue';
import { defineComponent, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue';
import { useDebounce } from '../../composables/use-debounce';
import { AnimationProp } from '../../types';
import { getTargetElement } from '../../utils/html';
import Fade from '../animations/fade.vue';
import { NoElement } from '../no-element';
Expand Down Expand Up @@ -77,15 +70,15 @@
referenceSelector: String,
/** Animation to use for opening/closing the modal.This animation only affects the content. */
animation: {
type: Object as PropType<string | typeof Vue>,
type: AnimationProp,
default: () => NoElement
},
/**
* Animation to use for the overlay (backdrop) part of the modal. By default, it uses
* a fade transition.
*/
overlayAnimation: {
type: Object as PropType<string | typeof Vue>,
type: AnimationProp,
default: () => Fade
},
/** Class inherited by content element. */
Expand Down

0 comments on commit aee5892

Please sign in to comment.