Skip to content

Commit

Permalink
refactor: avoid decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
diegopf committed May 6, 2024
1 parent cf5ff53 commit 299bba4
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Vue from 'vue';
import { Component, Inject } from 'vue-property-decorator';
import Vue, { inject } from 'vue';
import { Component } from 'vue-property-decorator';
import { DISABLE_ANIMATIONS_KEY } from '../decorators/injection.consts';

/**
Expand All @@ -21,8 +21,7 @@ export default class DisableAnimationMixin extends Vue {
*
* @public
*/
@Inject({ from: DISABLE_ANIMATIONS_KEY as string, default: false })
public disableAnimation!: boolean;
public disableAnimation = inject(DISABLE_ANIMATIONS_KEY as string, false);

/**
* The animation's name based on the {@link DisableAnimationMixin.disableAnimation} flag.
Expand Down

0 comments on commit 299bba4

Please sign in to comment.