Skip to content

Commit

Permalink
fix(component): add dense and outlined props
Browse files Browse the repository at this point in the history
add dense and outlined props on both select and textfield

fix #21
  • Loading branch information
yogakurniawan committed Jul 24, 2020
1 parent 55b5fb6 commit a2f43b4
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 17 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ Use the `vue-tel-input-vuetify` component:
| `flat` | `Boolean` | `false` | Removes elevation (shadow) added to element when using the solo or solo-inverted props |
| `light` | `Boolean` | `false` | Applies the light theme variant to the component. |
| `validate-on-blur` | `Boolean` | `false` | Delays validation until blur event |
| `dense` | `Boolean` | `false` | Reduces the input height |
| `outlined` | `Boolean` | `false` | Applies the outlined style to the input |
| `persistent-hint` | `Boolean` | `false` | Forces hint to always be visible |
| `readonly` | `Boolean` | `false` | Puts input in readonly state |
Expand Down
17 changes: 12 additions & 5 deletions dist/vue-tel-input-vuetify.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vue-tel-input-vuetify.min.js

Large diffs are not rendered by default.

17 changes: 12 additions & 5 deletions dist/vue-tel-input-vuetify.umd.js

Large diffs are not rendered by default.

24 changes: 21 additions & 3 deletions lib/vue-tel-input-vuetify.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
@change="onChangeCountryCode"
:items="sortedCountries"
:disabled="disabled"
:outlined="outlined"
:dense="dense"
item-text="name"
item-value="dialCode"
return-object
Expand Down Expand Up @@ -41,6 +43,7 @@
:light="light"
:validate-on-blur="validateOnBlur"
:outlined="outlined"
:dense="dense"
:persistent-hint="persistentHint"
:readonly="readonly"
:error="error"
Expand Down Expand Up @@ -223,6 +226,10 @@ export default {
type: Boolean,
default: false,
},
dense: {
type: Boolean,
default: false,
},
persistentHint: {
type: Boolean,
default: false,
Expand Down Expand Up @@ -740,9 +747,20 @@ export default {
border-bottom: 1px solid #cacaca;
}
.v-select__selections {
.vti__flag {
margin-left: 18px;
.v-text-field {
.v-select__selections {
position: relative;
.vti__flag {
position: absolute;
margin-left: 18px;
}
}
&--outlined {
.v-select__selections {
.vti__flag {
margin-left: auto;
}
}
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/components/Example.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
<v-row justify="center">
<v-col cols="6">
<vue-tel-input-vuetify
outlined
:preferred-countries="['id', 'gb', 'ua', 'us']"
:valid-characters-only="true"
select-label="Code"
@input="onInput"
/>
</v-col>
Expand Down
24 changes: 21 additions & 3 deletions src/lib/vue-tel-input-vuetify.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
@change="onChangeCountryCode"
:items="sortedCountries"
:disabled="disabled"
:outlined="outlined"
:dense="dense"
item-text="name"
item-value="dialCode"
return-object
Expand Down Expand Up @@ -41,6 +43,7 @@
:light="light"
:validate-on-blur="validateOnBlur"
:outlined="outlined"
:dense="dense"
:persistent-hint="persistentHint"
:readonly="readonly"
:error="error"
Expand Down Expand Up @@ -223,6 +226,10 @@ export default {
type: Boolean,
default: false,
},
dense: {
type: Boolean,
default: false,
},
persistentHint: {
type: Boolean,
default: false,
Expand Down Expand Up @@ -740,9 +747,20 @@ export default {
border-bottom: 1px solid #cacaca;
}
.v-select__selections {
.vti__flag {
margin-left: 18px;
.v-text-field {
.v-select__selections {
position: relative;
.vti__flag {
position: absolute;
margin-left: 18px;
}
}
&--outlined {
.v-select__selections {
.vti__flag {
margin-left: auto;
}
}
}
}
}
Expand Down

0 comments on commit a2f43b4

Please sign in to comment.