Skip to content

Commit

Permalink
feat: Added WIP Inpout Switch component
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Akpa committed Jul 11, 2018
1 parent d946d83 commit 3b838fd
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions src/components/InputSwitch.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<template>
<div
:class="[allSelected ? 'allSelected': null]">
<BaseInput
:id="id"
v-bind="$attrs"
:label="label"
:value="value"
class="ft-switch"
v-on="$listeners">
<div class="ft-input-checkbox-wrap">
<div class="ft-input-checkbox-target" />
</div>
<slot/>
</BaseInput>
</div>
</template>

<script>
import Vue from "vue"
import BaseInput from "./BaseInput.vue"
export default Vue.extend({
name: "InputSwitch",
components: {
BaseInput
},
props:{
value:{
type:[String,Boolean,Object,Number],
default:null
},
modelValue:{
type:[String,Boolean,Object,Number],
default:false
},
label:{
type:String,
default:null
},
id:{
type:String,
default:null
},
inherited:{
type:Boolean,
default:false
},
allSelected:{
type:Boolean,
default:false
}
}
})
</script>
<style lang="scss">
@import "./node_modules/@fishtank/colors/dist/index.scss";
@import "./src/styles/components/_input-switch";
</style>

0 comments on commit 3b838fd

Please sign in to comment.