Skip to content

Commit

Permalink
chore: demo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rick-hup committed Dec 18, 2024
1 parent db8fb1c commit 33d0efe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/components/content/ComponentPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const key = ref(0)
<template>
<div class="border rounded-lg mt-4 relative">
<Motion
:key="key"
:as-child="true"
:initial="{ rotate: 0 }"
:animate="{ rotate: 360 }"
Expand Down
4 changes: 3 additions & 1 deletion docs/components/demo/animate-frame/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const cubeRef = ref<HTMLElement | null>(null)
useAnimationFrame((t) => {
const rotate = Math.sin(t / 10000) * 200
const y = (1 + Math.sin(t / 1000)) * -50
cubeRef.value!.style.transform = `translateY(${y}px) rotateX(${rotate}deg) rotateY(${rotate}deg)`
if (cubeRef.value) {
cubeRef.value!.style.transform = `translateY(${y}px) rotateX(${rotate}deg) rotateY(${rotate}deg)`
}
})
</script>

Expand Down
3 changes: 2 additions & 1 deletion docs/components/demo/shared-layout/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { ref } from 'vue'
import { initialTabs as tabs } from './ingredients.ts'
import { initialTabs as tabs } from './ingredients'
import { AnimatePresence, Motion } from 'motion-v'
const selectedTab = ref(tabs[0])
Expand Down Expand Up @@ -47,6 +47,7 @@ const selectedTab = ref(tabs[0])
.window {
width: 480px;
height: 360px;
max-width: 320px;
border-radius: 10px;
background: white;
overflow: hidden;
Expand Down

0 comments on commit 33d0efe

Please sign in to comment.