Skip to content

Commit

Permalink
fix(MdFile): disabled icon (#1787)
Browse files Browse the repository at this point in the history
fix #1782
  • Loading branch information
VdustR authored and Samuell1 committed Jun 7, 2018
1 parent c3f6eb0 commit 21d7e67
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/components/MdField/MdFile/MdFile.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="md-file">
<md-file-icon @click.native="openPicker" />
<md-file-icon class="md-file-icon" :class="iconClass" @click.native="openPicker" />

<input
class="md-input"
Expand Down Expand Up @@ -31,6 +31,13 @@
},
name: String
},
computed: {
iconClass () {
return {
'md-disabled': this.disabled
}
}
},
mixins: [MdFieldMixin],
inject: ['MdField'],
methods: {
Expand Down Expand Up @@ -95,8 +102,14 @@
border: 0;
}
.md-icon {
cursor: pointer;
.md-file-icon {
&:not(.md-disabled) {
cursor: pointer;
}
&.md-disabled {
pointer-events: none;
}
}
}
</style>

0 comments on commit 21d7e67

Please sign in to comment.