Skip to content
This repository has been archived by the owner on Nov 30, 2020. It is now read-only.

Commit

Permalink
feat(demos): Added demo for linear progress component
Browse files Browse the repository at this point in the history
  • Loading branch information
matsp committed Dec 16, 2017
1 parent 509cd1f commit 584fba5
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
4 changes: 4 additions & 0 deletions demo/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ export default new VueRouter({
path: '/iconToggle',
component: () => import('views/IconToggleView')
},
{
path: '/linearProgress',
component: () => import('views/LinearProgressView')
},
{
path: '/textfield',
component: () => import('views/TextfieldView')
Expand Down
5 changes: 5 additions & 0 deletions demo/store/modules/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ const state = {
route: '/iconToggle',
icon: 'code'
},
linearProgress: {
text: 'LinearProgress',
route: '/linearProgress',
icon: 'code'
},
textfield: {
text: 'Textfield',
route: '/textfield',
Expand Down
38 changes: 38 additions & 0 deletions demo/views/LinearProgressView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<template>
<m-layout-grid-inner>
<m-layout-grid-cell :span="12">
<m-typo-display :level="1">LinearProgress</m-typo-display>
<m-typo-body :level="2">
<a href="https://github.com/matsp/material-components-vue/blob/master/components/LinearProgress">
https://github.com/matsp/material-components-vue/blob/master/components/LinearProgress
</a>
</m-typo-body>
</m-layout-grid-cell>
<m-layout-grid-cell :span="8" class="flex">
<m-linear-progress ref="progress" open :progress="0.5" :buffer="0.5" indeterminate/>
<br />
<m-button @click="stopProgress" raised interactive> Hide </m-button>
<p />
<m-button @click="startProgress" stroked> Show </m-button>
</m-layout-grid-cell>
</m-layout-grid-inner>
</template>

<script>
export default {
data () {
return {
text: '',
pw: ''
}
},
methods: {
stopProgress () {
this.$refs.progress.hide()
},
startProgress () {
this.$refs.progress.show()
}
}
}
</script>

0 comments on commit 584fba5

Please sign in to comment.