1414 </div >
1515
1616 <div class =" step-actions" >
17+ <button v-if =" currentStep > 0" @click =" currentStep--" class =" btn prev-btn" >
18+ Previous
19+ </button >
1720 <button v-if =" currentStep < steps.length - 1" @click =" nextStep" class =" btn next-btn" >
1821 Next
1922 </button >
@@ -52,12 +55,15 @@ const goToStep = (index) => {
5255 display : flex ;
5356 flex-direction : column ;
5457 align-items : center ;
58+ height : 100%
5559}
60+
5661.step-indicators {
5762 display : flex ;
5863 justify-content : center ;
5964 margin-bottom : 1rem ;
6065}
66+
6167.step {
6268 caret-color : transparent ;
6369 width : 50px ;
@@ -71,11 +77,13 @@ const goToStep = (index) => {
7177 cursor : pointer ;
7278 border : 2px solid black ;
7379 box-shadow : 2px 2px 0px rgba (0 , 0 , 0 , 1 );
80+ transition : transform 0.1s ease-out , box-shadow 0.1s ;
7481}
7582
7683.step :hover {
7784 background-color : darkgray ;
7885 box-shadow : 0px 0px 0px rgba (0 , 0 , 0 , 1 );
86+ transform : translate (2px , 2px );
7987}
8088
8189.step.active {
@@ -90,6 +98,24 @@ const goToStep = (index) => {
9098 margin-bottom : 3rem ;
9199}
92100
101+ .step-actions {
102+ display : grid ;
103+ grid-template-rows : 1 ;
104+ grid-template-columns : 2 ;
105+ justify-content : space-between ;
106+ width : 10% ;
107+ position : absolute ;
108+ bottom : 8rem ;
109+ }
110+
111+ .prev-btn {
112+ grid-column : 1 ;
113+ }
114+
115+ .next-btn {
116+ grid-column : 2 ;
117+ }
118+
93119.next-btn ,
94120.prev-btn ,
95121.finish-btn {
@@ -99,9 +125,7 @@ const goToStep = (index) => {
99125 border-radius : 4px ;
100126 background-color : #f4f4f0 ;
101127 box-shadow : 3px 3px 0px rgba (0 , 0 , 0 , 1 );
102- transition :
103- transform 0.1s ease-in-out ,
104- box-shadow 0.1s ;
128+ transition : transform 0.1s ease-in-out , box-shadow 0.1s ;
105129 font-weight : bold ;
106130}
107131
0 commit comments