diff --git a/src/AppMenu.vue b/src/AppMenu.vue index 59f1e2c94..0c2dc595b 100644 --- a/src/AppMenu.vue +++ b/src/AppMenu.vue @@ -13,6 +13,7 @@ ● InputText ● Listbox ● RadioButton + ● Rating ● SelectButton ● Textarea ● ToggleButton diff --git a/src/assets/styles/primevue.css b/src/assets/styles/primevue.css index c43e2a0e6..8ac9d1d65 100644 --- a/src/assets/styles/primevue.css +++ b/src/assets/styles/primevue.css @@ -9,6 +9,7 @@ @import '../../components/listbox/Listbox.css'; @import '../../components/panel/Panel.css'; @import '../../components/radiobutton/RadioButton.css'; +@import '../../components/rating/Rating.css'; @import '../../components/tabview/TabView.css'; @import '../../components/textarea/Textarea.css'; @import '../../components/toolbar/Toolbar.css'; \ No newline at end of file diff --git a/src/components/rating/Rating.css b/src/components/rating/Rating.css new file mode 100644 index 000000000..c7d23dda4 --- /dev/null +++ b/src/components/rating/Rating.css @@ -0,0 +1,12 @@ +.p-rating a { + cursor: pointer; +} + +.p-rating { + font-size: 1.25em; +} + +.p-rating.p-disabled a, +.p-rating.p-rating-readonly a { + cursor: default; +} \ No newline at end of file diff --git a/src/components/rating/Rating.vue b/src/components/rating/Rating.vue new file mode 100644 index 000000000..52404b277 --- /dev/null +++ b/src/components/rating/Rating.vue @@ -0,0 +1,54 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main.js b/src/main.js index d8a8e7c00..4290c5471 100644 --- a/src/main.js +++ b/src/main.js @@ -11,6 +11,7 @@ import InputText from './components/inputtext/InputText'; import Fieldset from './components/fieldset/Fieldset'; import Listbox from './components/listbox/Listbox'; import Panel from './components/panel/Panel'; +import Rating from './components/rating/Rating'; import RadioButton from './components/radiobutton/RadioButton'; import SelectButton from './components/selectbutton/SelectButton'; import Textarea from './components/textarea/Textarea'; @@ -37,6 +38,7 @@ Vue.component('p-listbox', Listbox); Vue.component('p-fieldset', Fieldset); Vue.component('p-panel', Panel); Vue.component('p-radioButton', RadioButton); +Vue.component('p-rating', Rating); Vue.component('p-selectButton', SelectButton); Vue.component('p-tabView', TabView); Vue.component('p-tabPanel', TabPanel); diff --git a/src/router.js b/src/router.js index d90d7ced3..fe0018398 100644 --- a/src/router.js +++ b/src/router.js @@ -66,6 +66,11 @@ export default new Router({ name: 'radiobutton', component: () => import('./views/radiobutton/RadioButtonDemo.vue') }, + { + path: '/rating', + name: 'rating', + component: () => import('./views/rating/RatingDemo.vue') + }, { path: '/selectbutton', name: 'selectbutton', diff --git a/src/views/rating/RatingDemo.vue b/src/views/rating/RatingDemo.vue new file mode 100644 index 000000000..7ae093b9f --- /dev/null +++ b/src/views/rating/RatingDemo.vue @@ -0,0 +1,39 @@ + + + + + Rating + Rating component is a star based selection input. + + + + + Basic {{val1}} + + + No Cancel {{val2}} + + + ReadOnly + + + Disabled + + + + + + + +
Rating component is a star based selection input.