-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(create-animation): migrate to composition API
- Loading branch information
1 parent
adce3c4
commit 3045a9e
Showing
4 changed files
with
60 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
packages/_vue3-migration-test/src/components/animations/test-animate-clip-path.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<template> | ||
<div class="animate-modal"> | ||
<OpenMainModal>Open X</OpenMainModal> | ||
<MainModal contentClass="content-animation-clip" :animation="modalAnimation"> | ||
<h1>Hello</h1> | ||
<p>The modal is working</p> | ||
<CloseMainModal>Close X</CloseMainModal> | ||
</MainModal> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import MainModal from '../../../../x-components/src/components/modals/main-modal.vue'; | ||
import CloseMainModal from '../../../../x-components/src/components/modals/close-main-modal.vue'; | ||
import OpenMainModal from '../../../../x-components/src/components/modals/open-main-modal.vue'; | ||
import { animateClipPath } from '../../../../x-components/src/components/animations/animate-clip-path/animate-clip-path.factory'; | ||
const modalAnimation = animateClipPath('bottom'); | ||
</script> | ||
|
||
<style> | ||
.animate-modal { | ||
.content-animation-clip { | ||
background: white; | ||
margin: auto; | ||
height: 300px; | ||
width: 800px; | ||
border: 3px solid green; | ||
padding: 10px; | ||
} | ||
.overlay { | ||
background-color: red; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters