11<template >
22    <div  class =" selection-step"  >
33        <p  class =" selection-question"  >{{ this.$t(question) }}</p >
4-         <div  class =" selection-buttons"  >
5-             <div  class =" selection-button selection-button-no"  >
6-                 <b-button 
7-                     icon-left =times 
8-                     :type =this.noButtonType 
9-                     :outlined =noButtonOutlined 
10-                     @click =" update(false)"  >
11-                     No
12-                 </b-button >
13-             </div >
14-             <div  class =" selection-button selection-button-yes"  >
15-                 <b-button 
16-                     icon-left =check 
17-                     :type =this.yesButtonType 
18-                     :outlined =yesButtonOutlined 
19-                     @click =" update(true)"  >
20-                     Yes
21-                 </b-button >
22-             </div >
4+         <div  class =" selection-choice selection-yes" 
5+              :class =" yesClass" 
6+              @click =" update(true)"  >
7+             <b-button 
8+                 icon-left =check 
9+                 type =" is-primary" 
10+                 inverted 
11+                 outlined 
12+                 @click =" update(true)"  >
13+                 Yes
14+             </b-button >
15+             <p  :class =" yesClass" 
16+                v-html =" $t(yesText)"  />
17+ 
18+         </div >
19+ 
20+         <div  class =" selection-choice selection-no" 
21+              :class =" noClass" 
22+              @click =" update(false)"  >
23+ 
24+             <b-button 
25+                 icon-left =times 
26+                 type =" is-primary" 
27+                 inverted 
28+                 outlined 
29+                 @click =" update(false)"  >
30+                 No
31+             </b-button >
32+             <p  :class =" noClass" 
33+                 v-html =" $t(noText)"  />
2334        </div >
24-         <p  v-html =" $t(currentText)"  />
25-         <hr >
2635    </div >
2736</template >
2837
2938<script >
39+ 
3040export  default  {
3141    name:  ' SelectionStep'  , 
3242    props:  [' selected'  , ' stepId'  ], 
@@ -41,9 +51,11 @@ export default {
4151        question () { 
4252            return  ` stepper-question.${ this .stepId .toLowerCase ()} `  
4353        }, 
44-         currentText () { 
45-             const  selectedModifier  =  this .isSelected  ?  ' '   :  ' not-'  
46-             return  ` stepper-description.${ this .stepId .toLowerCase ()}  .${ selectedModifier}  selected`  
54+         yesText () { 
55+             return  ` stepper-description.${ this .stepId .toLowerCase ()}  .selected`  
56+         }, 
57+         noText () { 
58+             return  ` stepper-description.${ this .stepId .toLowerCase ()}  .not-selected`  
4759        }, 
4860        isSelected:  { 
4961            get () { return  this .selected  }, 
@@ -62,6 +74,12 @@ export default {
6274        }, 
6375        noButtonOutlined () { 
6476            return  this .isSelected  
77+         }, 
78+         yesClass () { 
79+             return  this .isSelected  ?  ' selected'   :  ' not-selected'  
80+         }, 
81+         noClass () { 
82+             return  this .isSelected  ?  ' not-selected'   :  ' selected'  
6583        } 
6684    }, 
6785    watch:  { 
@@ -72,25 +90,31 @@ export default {
7290} 
7391 </script >
7492
75- <style  scoped>
93+ <style  lang="scss"  scoped>
7694    .selection-question  { 
77-         text-align  : center ; 
7895        margin-bottom  : 1rem  ; 
79-         font-weight :  600 ; 
96+         color : white ; 
8097    } 
81-     .selection-buttons  { 
82-         display  :grid ; 
83-         grid-template-columns  : 1fr   1fr  ; 
84-         grid-gap  : 2rem  ; 
85-         margin-bottom  :1rem  ; 
98+     .selection-choice  { 
99+         display  : grid ; 
100+         grid-template-columns  : 1fr   5fr  ; 
101+         grid-gap  : 1rem  ; 
102+         padding  : 1rem   3rem  ; 
103+         margin-left  : -3rem  ; 
104+         margin-right  : -3rem  ; 
105+         border-top  : 1px   dotted  white ; 
106+         border-bottom  : 1px   dotted  white ; 
107+         & :hover  { 
108+             background-color  : #FB7729 ; 
109+          } 
86110    } 
87-     .selection-button  { 
88-         align-self :  center ; 
111+     p .selected  { 
112+         color : white ; 
89113    } 
90-     .selection-button-no   { 
91-         justify-self :  end ; 
92-     }  
93-     .selection-button-yes  {  
94-         justify-self :  start ;  
114+     div .selection-choice.selected   { 
115+         background-color :  darken ( #05B5DA ,  10 % ) ; 
116+          & :hover  {  
117+              background-color :  #FB7729 ;  
118+         }  
95119    } 
96120 </style >
0 commit comments