Skip to content

Instantly share code, notes, and snippets.

@MrJmpl3
Created July 29, 2019 04:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MrJmpl3/1fd0fc22973319000754e1f6da1f376c to your computer and use it in GitHub Desktop.
Save MrJmpl3/1fd0fc22973319000754e1f6da1f376c to your computer and use it in GitHub Desktop.
Vuetify 1.5 - Textfield Dense
import VTextField from 'vuetify/lib/components/VTextField/VTextField';
export default VTextField.extend({
name: 'v-text-field-with-dense',
props: {
dense: {
type: Boolean,
default: false
}
},
computed: {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
classes(): any {
return {
'v-text-field': true,
'v-text-field--full-width': this.fullWidth,
'v-text-field--prefix': this.prefix,
'v-text-field--single-line': this.isSingle,
'v-text-field--solo': this.isSolo,
'v-text-field--solo-inverted': this.soloInverted,
'v-text-field--solo-flat': this.flat,
'v-text-field--box': this.box,
'v-text-field--enclosed': this.isEnclosed,
'v-text-field--reverse': this.reverse,
'v-text-field--outline': this.hasOutline,
'v-text-field--placeholder': this.placeholder,
'v-text-field--dense': this.dense
};
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment