hongluan-ui
Version:
Hongluan Component Library for Vue 3
36 lines (33 loc) • 889 B
JavaScript
import { defineComponent, ref, provide, h } from 'vue';
import '../../../hooks/index.mjs';
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
const Timeline = defineComponent({
name: "Timeline",
props: {
center: {
type: Boolean,
default: false
},
alternate: {
type: Boolean,
default: false
}
},
setup(props, ctx) {
const { namespace } = useNamespace("timeline");
const hasIcon = ref(false);
provide("timeline", { hasIcon, props });
return () => {
var _a, _b;
return h("ul", {
class: [{
"has-icon": hasIcon.value,
"center": props.center,
"alternate": props.alternate
}, namespace.value]
}, (_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a));
};
}
});
export { Timeline as default };
//# sourceMappingURL=timeline.mjs.map