vuetify
Version:
Vue Material Component Framework
43 lines • 1.24 kB
JavaScript
import { createVNode as _createVNode } from "vue";
// Composables
import { makeTagProps } from "../../composables/tag.mjs";
import { useTextColor } from "../../composables/color.mjs"; // Utilities
import { toRef } from 'vue';
import { genericComponent, useRender } from "../../util/index.mjs";
export const VListSubheader = genericComponent()({
name: 'VListSubheader',
props: {
color: String,
inset: Boolean,
sticky: Boolean,
title: String,
...makeTagProps()
},
setup(props, _ref) {
let {
slots
} = _ref;
const {
textColorClasses,
textColorStyles
} = useTextColor(toRef(props, 'color'));
useRender(() => {
const hasText = !!(slots.default || props.title);
return _createVNode(props.tag, {
"class": ['v-list-subheader', {
'v-list-subheader--inset': props.inset,
'v-list-subheader--sticky': props.sticky
}, textColorClasses.value],
"style": {
textColorStyles
}
}, {
default: () => [hasText && _createVNode("div", {
"class": "v-list-subheader__text"
}, [slots.default?.() ?? props.title])]
});
});
return {};
}
});
//# sourceMappingURL=VListSubheader.mjs.map