22 <!-- eslint-disable max-len -->
33 <section class =" onboarding-sub-container" >
44 <h1 >{{slide.current}} / {{slide.count}}</h1 >
5- <h1 class =" onboarding-sub-container-content-heading leading-none" >I like</h1 >
6- <div class =" h-64 pb-4 my-8 border-b-2 max-w-xs border-purple-matcha flex flex-col items-center w-full overflow-scroll" >
7- <SelectionButton v-bind:val =" 'coffee'" v-bind:bus =" bus" v-on:select =" select" v-on:deselect =" deselect" ></SelectionButton >
8- <SelectionButton v-bind:val =" 'coffee'" v-bind:bus =" bus" v-on:select =" select" v-on:deselect =" deselect" ></SelectionButton >
9- <SelectionButton v-bind:val =" 'coffee'" v-bind:bus =" bus" v-on:select =" select" v-on:deselect =" deselect" ></SelectionButton >
10- <SelectionButton v-bind:val =" 'coffee'" v-bind:bus =" bus" v-on:select =" select" v-on:deselect =" deselect" ></SelectionButton >
11- <SelectionButton v-bind:val =" 'coffee'" v-bind:bus =" bus" v-on:select =" select" v-on:deselect =" deselect" ></SelectionButton >
12- <SelectionButton v-bind:val =" 'coffee'" v-bind:bus =" bus" v-on:select =" select" v-on:deselect =" deselect" ></SelectionButton >
13- <SelectionButton v-bind:val =" 'coffee'" v-bind:bus =" bus" v-on:select =" select" v-on:deselect =" deselect" ></SelectionButton >
14- <SelectionButton v-bind:val =" 'coffee'" v-bind:bus =" bus" v-on:select =" select" v-on:deselect =" deselect" ></SelectionButton >
15- <SelectionButton v-bind:val =" 'coffee'" v-bind:bus =" bus" v-on:select =" select" v-on:deselect =" deselect" ></SelectionButton >
16- <SelectionButton v-bind:val =" 'coffee'" v-bind:bus =" bus" v-on:select =" select" v-on:deselect =" deselect" ></SelectionButton >
17- <SelectionButton v-bind:val =" 'coffee'" v-bind:bus =" bus" v-on:select =" select" v-on:deselect =" deselect" ></SelectionButton >
5+ <h1 class =" onboarding-sub-container-content-heading leading-none" >Interests</h1 >
6+ <p class =" mt-2" >{{interestsSelected}} / {{maxInterests}}</p >
7+ <div class =" h-64 pb-1 my-8 border-b-2 max-w-xs border-purple-matcha flex flex-col items-center w-full overflow-scroll" >
8+ <SelectionButton v-for =" interest in interests" :key =" interest._id" v-bind:val =" interest" v-bind:bus =" bus" v-on:select =" select" v-on:deselect =" deselect" ></SelectionButton >
189 </div >
19- <button v-bind:disabled =" !optionSelected.length" v-bind:class =" {'onboarding-sub-container-content -button-outline-light': true, 'mt-0 ': true, 'opacity-25': !optionSelected.length, 'cursor-default': !optionSelected.length}" v-on:click =" saveInput()" >{{slide.buttonText}}</button >
10+ <button v-bind:disabled =" !optionSelected.length" v-bind:class =" {'onboarding-sub-container-slide -button': true, 'opacity-25': !optionSelected.length, 'cursor-default': !optionSelected.length}" v-on:click =" saveInput()" >{{slide.buttonText}}</button >
2011 </section >
2112</template >
2213
@@ -30,6 +21,27 @@ export default {
3021 },
3122 props: [' slide' ],
3223 data : () => ({
24+ interests: [
25+ ' Swimming' , ' Wine' , ' Reading' , ' Foodie' ,
26+ ' Netflix' , ' Music' , ' Yoga' , ' Golf' ,
27+ ' Photography' , ' Baking' , ' Shopping' ,
28+ ' Outdoors' , ' Art' , ' Travel' , ' Hiking' ,
29+ ' Running' , ' Volunteering' , ' Cycling' ,
30+ ' Climbing' , ' Tea' , ' Fishing' , ' Soccer' ,
31+ ' Museum' , ' Dancing' , ' Surfing' ,
32+ ' Karaoke' , ' Grab a drink' , ' DIY' ,
33+ ' Walking' , ' Cat lover' , ' Movies' ,
34+ ' Gardening' , ' Trivia' , ' Working out' ,
35+ ' Cooking' , ' Gamer' , ' Brunch' ,
36+ ' Blogging' , ' Picknicking' , ' Athlete' ,
37+ ' Dog lover' , ' Politics' , ' Environmentalism' ,
38+ ' Instagram' , ' Spirituality' ,
39+ ' Language exchange' , ' Sports' , ' Comdey' ,
40+ ' Fashion' , ' Disney' , ' Vlogging' ,
41+ ' Astrology' , ' Board Games' , ' Craft Beer' ,
42+ ' Coffee' , ' Writer' ,
43+ ],
44+ maxInterests: 10 ,
3345 optionSelected: [],
3446 bus: new Vue (),
3547 }),
@@ -45,5 +57,10 @@ export default {
4557 this .optionSelected = this .optionSelected .filter ((e ) => e !== val);
4658 },
4759 },
60+ computed: {
61+ interestsSelected () {
62+ return this .optionSelected .length ;
63+ },
64+ },
4865};
4966 </script >
0 commit comments