diff --git a/src/components/mdRatingBar/index.js b/src/components/mdRatingBar/index.js new file mode 100644 index 0000000..6f8dc7d --- /dev/null +++ b/src/components/mdRatingBar/index.js @@ -0,0 +1,8 @@ +import mdRatingBar from './mdRatingBar.vue'; +import mdRatingBarTheme from './mdRatingBar.theme'; + +export default function install(Vue) { + Vue.component('md-rating-bar', mdRatingBar); + + Vue.material.styles.push(mdRatingBarTheme); +} diff --git a/src/components/mdRatingBar/mdRatingBar.scss b/src/components/mdRatingBar/mdRatingBar.scss new file mode 100644 index 0000000..5891ef1 --- /dev/null +++ b/src/components/mdRatingBar/mdRatingBar.scss @@ -0,0 +1,31 @@ +@import '../../core/stylesheets/variables.scss'; + +$button-radius: 2px; + +.md-rating-bar { + width: auto; + display: flex; + color: rgba(#000, .3); + width: fit-content; + + > .front-stars { + overflow-x: hidden; + display: inherit; + } + + > .back-stars { + &:not([disabled]) { + &:hover{ + background-color: rgba(#999, .2); + text-decoration: none; + } + } + } + + > .back-stars, > .front-stars { + > .md-icon { + margin: 0; + white-space: nowrap; + } + } +} diff --git a/src/components/mdRatingBar/mdRatingBar.theme b/src/components/mdRatingBar/mdRatingBar.theme new file mode 100644 index 0000000..edc0d56 --- /dev/null +++ b/src/components/mdRatingBar/mdRatingBar.theme @@ -0,0 +1,3 @@ +.THEME_NAME { + +} diff --git a/src/components/mdRatingBar/mdRatingBar.vue b/src/components/mdRatingBar/mdRatingBar.vue new file mode 100644 index 0000000..da0a668 --- /dev/null +++ b/src/components/mdRatingBar/mdRatingBar.vue @@ -0,0 +1,41 @@ + + + + + diff --git a/src/index.js b/src/index.js index 9a0f757..7148d71 100644 --- a/src/index.js +++ b/src/index.js @@ -18,6 +18,7 @@ import MdList from './components/mdList'; import MdMenu from './components/mdMenu'; import MdProgress from './components/mdProgress'; import MdRadio from './components/mdRadio'; +import MdRatingBar from './components/mdRatingBar'; import MdSelect from './components/mdSelect'; import MdSidenav from './components/mdSidenav'; import MdSnackbar from './components/mdSnackbar'; @@ -52,6 +53,7 @@ const options = { MdMenu, MdProgress, MdRadio, + MdRatingBar, MdSelect, MdSidenav, MdSnackbar,