Skip to content

Commit

Permalink
change useBlottie name
Browse files Browse the repository at this point in the history
  • Loading branch information
Applelo committed Apr 28, 2024
1 parent bd6f53a commit ecc199b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ const { lottie, anim } = useBlottie(el, {
</template>
```

## Migration 1.0 to 2.0
## Migration from 1.0 to 2.0

All Lottie options are now move into `lottie` attribute to use typings from lottie (and not a version provided by Blottie).

Expand Down
2 changes: 1 addition & 1 deletion src/components/Blottie.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { PropType, SlotsType } from 'vue'
import { defineComponent, h, onUnmounted, ref, watch } from 'vue'
import type { AnimationEventName, LottiePlayer } from 'lottie-web'
import { useBlottie } from './../composables/blottie'
import { useBlottie } from '../composables/useBlottie'
import type { LottieOptions } from './../typings/blottie'

const events: AnimationEventName[] = [
Expand Down
4 changes: 2 additions & 2 deletions src/composables/blottie.ts → src/composables/useBlottie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import type {
LottiePlayer,
RendererType,
} from 'lottie-web'
import getPlayer from './../utils/getPlayer'
import type { LottieOptions } from './../typings/blottie'
import getPlayer from '../utils/getPlayer'
import type { LottieOptions } from '../typings/blottie'

export function useBlottie(
container: Ref<HTMLElement | null | undefined>,
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Blottie from './components/Blottie'
import { useBlottie } from './composables/blottie'
import { useBlottie } from './composables/useBlottie'
import type { BlottieExpose, BlottiePlayer } from './typings/blottie'

export { Blottie, BlottiePlayer, BlottieExpose, useBlottie }

0 comments on commit ecc199b

Please sign in to comment.