diff --git a/src/AppMenu.vue b/src/AppMenu.vue index f5f546110..7c217bdc5 100644 --- a/src/AppMenu.vue +++ b/src/AppMenu.vue @@ -42,7 +42,7 @@
- ● Link + ● Panel
diff --git a/src/assets/styles/primevue.css b/src/assets/styles/primevue.css index 3e62abf94..eb880c4f3 100644 --- a/src/assets/styles/primevue.css +++ b/src/assets/styles/primevue.css @@ -1,4 +1,5 @@ @import '../../components/common/Common.css'; @import '../../components/inputtext/InputText.css'; @import '../../components/listbox/ListBox.css'; -@import '../../components/button/Button.css'; \ No newline at end of file +@import '../../components/button/Button.css'; +@import '../../components/panel/Panel.css'; \ No newline at end of file diff --git a/src/components/panel/Panel.css b/src/components/panel/Panel.css new file mode 100644 index 000000000..37cfe5374 --- /dev/null +++ b/src/components/panel/Panel.css @@ -0,0 +1,48 @@ +.p-panel { + padding: 0.2em; +} + +.p-panel .p-panel-titlebar { + padding: .5em .75em; +} + +.p-panel .p-panel-titlebar-icon { + float: right; + cursor: pointer; + height: 1.25em; + width: 1.25em; + line-height: 1.25em; + text-align: center; +} + +.p-panel .p-panel-titlebar-icon span { + line-height: inherit; + margin-top: -1px; +} + +.p-panel .p-panel-content { + border: 0; + background: none; + padding: .5em .75em; +} + +.p-panel .p-panel-footer { + border-width: 1px 0 0; + padding: .25em .5em; + text-align:left; +} + +.p-panel-content-wrapper-collapsed { + overflow: hidden; + max-height: 0; + transition: max-height 0.5s cubic-bezier(0, 1, 0, 1); +} + +.p-panel-content-wrapper-expanded { + max-height: 1000px; + transition: max-height 1s ease-in-out; +} + +.p-panel-content-wrapper-expanding { + overflow: hidden; +} \ No newline at end of file diff --git a/src/components/panel/Panel.vue b/src/components/panel/Panel.vue new file mode 100644 index 000000000..17b52170e --- /dev/null +++ b/src/components/panel/Panel.vue @@ -0,0 +1,27 @@ + + + + + diff --git a/src/main.js b/src/main.js index 9243e1c89..0b04f4742 100644 --- a/src/main.js +++ b/src/main.js @@ -4,6 +4,7 @@ import router from './router'; import InputText from './components/inputtext/InputText'; import ListBox from './components/listbox/ListBox'; import Button from './components/button/Button'; +import Panel from './components/panel/Panel'; import './assets/styles/primevue.css'; import 'primeflex/primeflex.css'; @@ -14,6 +15,7 @@ Vue.config.productionTip = false; Vue.component('p-inputtext', InputText); Vue.component('p-button', Button); Vue.component('p-listBox', ListBox); +Vue.component('p-panel', Panel); new Vue({ router, diff --git a/src/router.js b/src/router.js index 01419b6cd..eac022fc1 100644 --- a/src/router.js +++ b/src/router.js @@ -11,11 +11,6 @@ export default new Router({ name: 'home', component: Home }, - { - path: '/about', - name: 'about', - component: () => import('./views/About.vue') - }, { path: '/inputtext', name: 'inputtext', @@ -30,6 +25,11 @@ export default new Router({ path: '/button', name: 'button', component: () => import('./views/button/ButtonDemo.vue') + }, + { + path: '/panel', + name: 'panel', + component: () => import('./views/panel/PanelDemo.vue') } ] }); diff --git a/src/views/About.vue b/src/views/About.vue deleted file mode 100644 index 3fa28070d..000000000 --- a/src/views/About.vue +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/src/views/panel/PanelDemo.vue b/src/views/panel/PanelDemo.vue new file mode 100644 index 000000000..85a4beb85 --- /dev/null +++ b/src/views/panel/PanelDemo.vue @@ -0,0 +1,26 @@ + \ No newline at end of file