This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/vuetify/lib/components/VLabel/VLabel.js

63 lines
1.4 KiB
JavaScript
Raw Normal View History

2019-08-11 18:48:02 +00:00
// Styles
import "../../../src/components/VLabel/VLabel.sass"; // Mixins
import Colorable from '../../mixins/colorable';
import Themeable, { functionalThemeClasses } from '../../mixins/themeable';
import mixins from '../../util/mixins'; // Helpers
import { convertToUnit } from '../../util/helpers';
/* @vue/component */
export default mixins(Themeable).extend({
name: 'v-label',
functional: true,
props: {
absolute: Boolean,
color: {
type: String,
default: 'primary'
},
disabled: Boolean,
focused: Boolean,
for: String,
left: {
type: [Number, String],
default: 0
},
right: {
type: [Number, String],
default: 'auto'
},
value: Boolean
},
render(h, ctx) {
const {
children,
listeners,
props
} = ctx;
const data = {
staticClass: 'v-label',
class: {
'v-label--active': props.value,
'v-label--is-disabled': props.disabled,
...functionalThemeClasses(ctx)
},
attrs: {
for: props.for,
'aria-hidden': !props.for
},
on: listeners,
style: {
left: convertToUnit(props.left),
right: convertToUnit(props.right),
position: props.absolute ? 'absolute' : 'relative'
},
ref: 'label'
};
return h('label', Colorable.options.methods.setTextColor(props.focused && props.color, data), children);
}
});
//# sourceMappingURL=VLabel.js.map