Skip to content

Commit

Permalink
Added ability to rename navigation buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Puredbest committed Feb 16, 2022
1 parent 8a3d342 commit efa32a4
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Template/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<template #hotspots>
<iv-pane position='left' @paneReveal="paneReveal" @paneHide="paneHide" @paneToggle="paneToggle" @paneResize="paneResize">
<iv-sidebar-content>
<iv-sidebar-content nextText='test N' previousText='test P'>
<iv-sidebar-section title="SDOF">
This SDOF solver takes in your parameters and then produces a time history plot of your system. Try it out by changing the input parameters and pressing submit to view your solution at the bottom of the page. To submit feedback for this module please click <a href="https://forms.gle/puL3mKPbchXzsRrV7" target="_blank">here</a>.

Expand Down
83 changes: 68 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
{
"name": "@impvis/components",


"version": "1.5.2",



"license": "BSD-3-Clause",
"main": "./dist/impvis-components.js",
"unpkg": "./dist/impvis-components.umd.js",
Expand Down
16 changes: 13 additions & 3 deletions src/components/Navigation/PaneNavigator.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
<template>
<div class="iv-pane-navigator">
<a href="#" id="iv-pagination-prev" class="iv-button">Previous</a>
<a href="#" id="iv-pagination-next" class="iv-button">Next</a>
<a href="#" id="iv-pagination-prev" class="iv-button">{{prevText}}</a>
<a href="#" id="iv-pagination-next" class="iv-button">{{nextText}}</a>
</div>
</template>
<script>
export default{
name:'iv-pane-navigator'
name:'iv-pane-navigator',
props:{
nextText:{
type:String,
default:'Next'
},
prevText:{
type:String,
default:'Previous'
}
}
}
</script>
<style lang="scss">
Expand Down
10 changes: 9 additions & 1 deletion src/components/SidebarText/SidebarContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div class="iv-sidebar-content-body" ref="body">
<slot/>
</div>
<iv-pane-navigator v-if="showPagination"/>
<iv-pane-navigator :nextText="nextText" :prevText="previousText" v-if="showPagination"/>
</div>
</template>
<script>
Expand All @@ -36,6 +36,14 @@ export default {
showPagination:{
type:Boolean,
default:true
},
previousText:{
type:String,
default:'Previous'
},
nextText:{
type:String,
default:'Next'
}
},
provide(){
Expand Down

0 comments on commit efa32a4

Please sign in to comment.