Skip to content

Commit

Permalink
add previous step and next step labels
Browse files Browse the repository at this point in the history
  • Loading branch information
btazi committed Feb 21, 2018
1 parent dbd2dfb commit 53c1376
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions components/Wizard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
<div class="wizard__body">
<div class="wizard__body__step"><slot :name="currentSlot"></slot></div>
<div class="wizard__body__actions clearfix">
<a v-if="backEnabled" class="wizard__back pull-left" @click="goBack()"> <img src="../images/back.png" alt="next icon"> <span>Back</span>
<a v-if="backEnabled" class="wizard__back pull-left" @click="goBack()"> <img src="../images/back.png" alt="next icon"> <span>{{previousStepLabel}}</span>
</a>
<a v-if="currentStep != steps.length - 1" class="wizard__next pull-right" @click="goNext()">
<span>Next</span> <img src="../images/next.png" alt="next icon">
<span>{{nextStepLabel}}</span> <img src="../images/next.png" alt="next icon">
</a>
<a v-if="currentStep == steps.length - 1" class="wizard__next pull-right final-step" @click="goNext()">
{{finalStepLabel}}
Expand All @@ -31,6 +31,8 @@ export default {
props: {
steps: {},
previousStepLabel: {default: 'Back'},
nextStepLabel: {default: 'Next'},
finalStepLabel: {default: 'Save'},
onNext: {},
onBack: {},
Expand Down Expand Up @@ -247,4 +249,4 @@ export default {
background-color: #6eb165;
}
</style>
</style>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-good-wizard",
"version": "1.1.2",
"version": "1.1.3",
"description": "An easy and clean VueJS 2.x wizard plugin ",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 53c1376

Please sign in to comment.