1
- {{ #if showFeedback }}
2
- {{ #if (eq feedbackState ' COLLAPSED' )}}
3
- <div class =" feed-box collapsed" {{ action ' changeState' ' EXPANDED' }} >
4
- <img src =" /images/love.svg" alt =" " class =" love-ico" >
5
- </div >
6
- {{ else if (eq feedbackState 'EXPANDED')}}
7
- <div class =" feed-overlay" ></div >
8
- <div class =" feed-box expanded" >
9
- <div class =" feed-text" >Did you like the video?</div >
10
- <form >
11
- <input type =" radio" name =" gender" value =" UP" {{ action ' submitFeedback' ' UP' }} > Yes
12
- <input type =" radio" name =" gender" value =" DOWN" {{ action ' submitFeedback' ' DOWN' }} > No
13
- </form >
14
- <img src =" /images/love.svg" alt =" " class =" love-ico" {{ action ' changeState' ' COLLAPSED' }} >
15
- </div >
16
- {{ else if (eq feedbackState 'SUBMITTED')}}
17
- <div class =" feed-overlay" ></div >
18
- <div class =" feed-box" >
19
- <div class =" feed-text" >Feedback Submitted</div >
20
- <img src =" /images/love.svg" alt =" " class =" love-ico" >
21
- </div >
22
- {{ else }}
23
-
24
- {{ /if }}
25
- {{ /if }}
1
+ <div class =" content-feedback" >
2
+ <div class =" cta font-md bold cursor pl-2 py-4" {{ on " click" this.toggleExpandedView }} role =" button" >
3
+ Give Feedback
4
+ </div >
5
+
6
+ {{ #if this.expanded }}
7
+ <div class =" expanded p-3 d-flex flex-column justify-content-center" >
8
+ <div class =" row font-sm" >
9
+ <div class =" col-12 bold py-2" >
10
+ How will you rate the video?
11
+ </div >
12
+ <div class =" col-12 py-2" >
13
+ <RatingBar @scale ={{ 5 }} @rating ={{ this.selectedRating }} @changeRating ={{ fn (mut this.selectedRating )}} />
14
+ </div >
15
+
16
+ {{ #unless (eq this.expansionType ' NONE' ) }}
17
+ <div class =" col-12 bold py-4 fade-in" >
18
+ <span class =" py-3" >
19
+ {{ this.expansionText }}
20
+ </span >
21
+
22
+ {{ #each this.expansionReasons as |reason |}}
23
+ <div class =" py-2" >
24
+ <label class =" radio-container v-align-ma" >
25
+ <input class =" radio" type =" radio" name =" reason"
26
+ checked ={{ eq this.selectedReason reason }}
27
+ onclick ={{ fn (mut this.selectedReason ) reason }} />
28
+ <span class =" checkmark t-smaller" ></span >
29
+ <span class =" font-xs" >{{ reason }} </span >
30
+ </label >
31
+ </div >
32
+ {{ /each }}
33
+ </div >
34
+ {{ /unless }}
35
+ </div >
36
+ </div >
37
+ {{ /if }}
38
+
39
+ </div >
40
+
41
+ <style >
42
+ .content-feedback {
43
+ position : absolute ;
44
+ right : 0 ;
45
+ top : 23% ;
46
+ }
47
+
48
+
49
+ .content-feedback .cta {
50
+ width : 35px ;
51
+ background-color : orange ;
52
+ writing-mode : vertical-lr ;
53
+ position : relative ;
54
+ transform-origin : center ;
55
+ transform : rotateZ (180deg );
56
+ }
57
+
58
+ .content-feedback .expanded {
59
+ position : absolute ;
60
+ right : 40px ;
61
+ top : -100px ;
62
+ width : 300px ;
63
+ height : 400px ;
64
+ background-color : #393B41 ;
65
+
66
+
67
+ }
68
+
69
+ .fade-in {
70
+ animation : fade-in 0.3s ease-in ;
71
+ }
72
+
73
+
74
+ @keyframes fade-in {
75
+ 0% {
76
+ opacity : 0 ;
77
+ }
78
+ 100% {
79
+ opacity : 1 ;
80
+ }
81
+ }
82
+ </style >
0 commit comments