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

Commit

Permalink
refactor(select): Replace Label & BottomLine with FloatingLabel &
Browse files Browse the repository at this point in the history
LineRipple (#96)

BREAKING CHANGES: Use FloatingLabel and LineRipple instead of the
removed SelectLabel and SelectBottomLine.
  • Loading branch information
matsp committed Apr 24, 2018
1 parent 7ddf97a commit 43fe087
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 93 deletions.
6 changes: 3 additions & 3 deletions components/select/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<option v-for="option in selectOptions" :key="option.text" :value="option.value" :selected="selected === option.value">
{{ option.text }}
</option>
<m-select-label
<m-floating-label
slot="label"
:floatAbove="selected !== ''">
Pick a food group
</m-select-label>
<m-select-bottom-line slot="bottomLine"/>
</m-floating-label>
<m-line-ripple slot="bottomLine"/>
</m-select>
```

Expand Down
39 changes: 0 additions & 39 deletions components/select/SelectBottomLine.vue

This file was deleted.

41 changes: 0 additions & 41 deletions components/select/SelectLabel.vue

This file was deleted.

4 changes: 0 additions & 4 deletions components/select/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import Select from './Select.vue'
import SelectBottomLine from './SelectBottomLine.vue'
import SelectLabel from './SelectLabel.vue'
import './styles.scss'

import { initPlugin } from '../'

const plugin = {
install (vm) {
vm.component('m-select', Select)
vm.component('m-select-bottom-line', SelectBottomLine)
vm.component('m-select-label', SelectLabel)
}
}
export default plugin
Expand Down
16 changes: 10 additions & 6 deletions demo/views/SelectView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
:selected="selected === option.value">
{{ option.text }}
</option>
<m-select-label
<m-floating-label
slot="label"
:float-above="selected !== ''">Pick a food group</m-select-label>
<m-select-bottom-line slot="bottomLine"/>
:float-above="selected !== ''">Pick a food group</m-floating-label>
<m-line-ripple slot="bottomLine"/>
</m-select>
</m-layout-grid-cell>
</m-layout-grid-inner>
Expand All @@ -34,10 +34,10 @@
:selected="selected === option.value">
{{ option.text }}
</option>
<m-select-label
<m-floating-label
slot="label"
:float-above="selected !== ''">Pick a food group</m-select-label>
<m-select-bottom-line slot="bottomLine"/>
:float-above="selected !== ''">Pick a food group</m-floating-label>
<m-line-ripple slot="bottomLine"/>
</m-select>
</m-layout-grid-cell>
</m-layout-grid-inner>
Expand All @@ -50,10 +50,14 @@ import Vue from 'vue'
import List from '../../dist/list'
import Menu from '../../dist/menu'
import Select from '../../dist/select'
import FloatingLabel from '../../dist/floating-label'
import LineRipple from '../../dist/line-ripple'
Vue.use(List)
Vue.use(Menu)
Vue.use(Select)
Vue.use(FloatingLabel)
Vue.use(LineRipple)
export default {
data () {
Expand Down

0 comments on commit 43fe087

Please sign in to comment.