File tree Expand file tree Collapse file tree 5 files changed +34
-9
lines changed Expand file tree Collapse file tree 5 files changed +34
-9
lines changed Original file line number Diff line number Diff line change 83
83
< / script>
84
84
85
85
< template>
86
- < Container class = " form--container" >
86
+ < Container class = " form--container js-anim--collapsed " >
87
87
< div class = " column" >
88
88
< div class = " row" >
89
89
< FormField
Original file line number Diff line number Diff line change 10
10
border-radius : 0.5rem ;
11
11
padding : 1rem ;
12
12
margin : 1.5rem auto 3rem auto ;
13
+ min-width : 350px ;
13
14
}
14
15
</style >
Original file line number Diff line number Diff line change 3
3
import Button from ' ./Button.vue' ;
4
4
import Content from ' ./Content.vue' ;
5
5
import AnimationForm from ' ./AnimationForm.vue' ;
6
+ import jsCssAnimations from ' ../../../js-css-animations/js-css-animations' ;
6
7
7
8
defineEmits ([' resetAnimation' ]);
8
9
</script >
11
12
export default {
12
13
props: {
13
14
animationFn: Function ,
15
+ animationName: String ,
14
16
title: String ,
15
17
btnList: Array ,
16
18
contentList: Array ,
19
21
},
20
22
mounted () {
21
23
this .animationFn ();
24
+ jsCssAnimations .init .fade ({
25
+ trigger: ` .customize--anchor__${ this .animationName } ` ,
26
+ targetSelector: ` .customize--form__${ this .animationName } ` ,
27
+ });
22
28
},
23
29
methods: {
24
30
titleId () {
34
40
<template >
35
41
<Container >
36
42
<h3 :id =" titleId()" class =" title" >{{ title }}</h3 >
37
- <a href =" #" >Customize the animation</a >
38
- <AnimationForm
39
- :initial =" animOpts"
40
- :fields-list =" $props.fieldsList"
41
- @resetAnimation =" opts => $emit('resetAnimation', opts)"
42
- />
43
+ <a
44
+ href =" #"
45
+ class =" customize--anchor"
46
+ :class =" `customize--anchor__${animationName}`"
47
+ >Customize this animation</a
48
+ >
49
+ <div >
50
+ <AnimationForm
51
+ :class =" `customize--form__${animationName}`"
52
+ :initial =" animOpts"
53
+ :fields-list =" $props.fieldsList"
54
+ @resetAnimation =" opts => $emit('resetAnimation', opts)"
55
+ />
56
+ </div >
43
57
<div class =" buttons" >
44
58
<Button v-for =" btn in btnList" v-bind =" btn" />
45
59
</div >
67
81
68
82
.title {
69
83
margin-top : 0 ;
70
- margin-bottom : 1.5rem ;
84
+ margin-bottom : 1rem ;
85
+ }
86
+
87
+ .customize--anchor {
88
+ display : flex ;
89
+ justify-content : right ;
71
90
}
72
91
</style >
Original file line number Diff line number Diff line change 105
105
}
106
106
107
107
input :focus ,
108
- select :focus {
108
+ select :focus ,
109
+ input :hover ,
110
+ select :hover {
109
111
border : 1px solid var (--vp-c-green-lighter );
110
112
}
111
113
Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ aside: false
119
119
120
120
<Example
121
121
: animation-fn ="slideAnimations"
122
+ : animation-name ="'slide'"
122
123
: title ="'Slide Animations'"
123
124
: btn-list ="examples.slide.btnList"
124
125
: content-list ="examples.slide.contentList"
@@ -150,6 +151,7 @@ jsCssAnimations.init.slideRight({
150
151
151
152
<Example
152
153
: animation-fn ="fadeAnimation"
154
+ : animation-name ="'fade'"
153
155
: title ="'Fade In / Out'"
154
156
: btn-list ="examples.fade.btnList"
155
157
: content-list ="examples.fade.contentList"
@@ -176,6 +178,7 @@ jsCssAnimations.init.fade({
176
178
177
179
<Example
178
180
: animation-fn ="collapseAnimation"
181
+ : animation-name ="'collapse'"
179
182
: title ="'Collapse/Expand'"
180
183
: btn-list ="examples.collapse.btnList"
181
184
: content-list ="examples.collapse.contentList"
You can’t perform that action at this time.
0 commit comments