From ee54eee5b068bc8fa4c485b3319f67e7ba8fc0da Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Sat, 15 Dec 2018 14:06:55 +0300 Subject: [PATCH] Implemented ToggleButton Component --- src/AppMenu.vue | 1 + src/components/togglebutton/ToggleButton.vue | 82 ++++++++++++++++++++ src/main.js | 2 + src/router.js | 5 ++ src/views/togglebutton/ToggleButtonDemo.vue | 35 +++++++++ 5 files changed, 125 insertions(+) create mode 100644 src/components/togglebutton/ToggleButton.vue create mode 100644 src/views/togglebutton/ToggleButtonDemo.vue diff --git a/src/AppMenu.vue b/src/AppMenu.vue index f58341d70..ef0cb0bbd 100644 --- a/src/AppMenu.vue +++ b/src/AppMenu.vue @@ -13,6 +13,7 @@ ● Listbox ● RadioButton ● Textarea + ● ToggleButton diff --git a/src/components/togglebutton/ToggleButton.vue b/src/components/togglebutton/ToggleButton.vue new file mode 100644 index 000000000..88c3501e2 --- /dev/null +++ b/src/components/togglebutton/ToggleButton.vue @@ -0,0 +1,82 @@ + + + \ No newline at end of file diff --git a/src/main.js b/src/main.js index 9426eacf7..7d7d55594 100644 --- a/src/main.js +++ b/src/main.js @@ -14,6 +14,7 @@ import Textarea from './components/textarea/Textarea'; import Toolbar from './components/toolbar/Toolbar'; import TabView from './components/tabview/TabView'; import TabPanel from './components/tabview/TabPanel'; +import ToggleButton from './components/togglebutton/ToggleButton'; import './assets/styles/primevue.css'; import 'primeflex/primeflex.css'; @@ -34,6 +35,7 @@ Vue.component('p-tabView', TabView); Vue.component('p-tabPanel', TabPanel); Vue.component('p-textarea', Textarea); Vue.component('p-toolbar', Toolbar); +Vue.component('p-toggleButton', ToggleButton); new Vue({ router, diff --git a/src/router.js b/src/router.js index 31d6c3417..9b35e1c48 100644 --- a/src/router.js +++ b/src/router.js @@ -66,6 +66,11 @@ export default new Router({ name: 'tabview', component: () => import('./views/tabview/TabViewDemo.vue') }, + { + path: '/togglebutton', + name: 'togglebutton', + component: () => import('./views/togglebutton/ToggleButtonDemo.vue') + }, { path: '/toolbar', name: 'toolbar', diff --git a/src/views/togglebutton/ToggleButtonDemo.vue b/src/views/togglebutton/ToggleButtonDemo.vue new file mode 100644 index 000000000..9bfb99bde --- /dev/null +++ b/src/views/togglebutton/ToggleButtonDemo.vue @@ -0,0 +1,35 @@ + + + + +