Divider.mjs 910 B

123456789101112131415161718192021222324252627282930313233
  1. import { defineComponent, createVNode as _createVNode } from "vue";
  2. import { truthProp, makeStringProp, createNamespace } from "../utils/index.mjs";
  3. const [name, bem] = createNamespace("divider");
  4. const dividerProps = {
  5. dashed: Boolean,
  6. hairline: truthProp,
  7. vertical: Boolean,
  8. contentPosition: makeStringProp("center")
  9. };
  10. var stdin_default = defineComponent({
  11. name,
  12. props: dividerProps,
  13. setup(props, {
  14. slots
  15. }) {
  16. return () => {
  17. var _a;
  18. return _createVNode("div", {
  19. "role": "separator",
  20. "class": bem({
  21. dashed: props.dashed,
  22. hairline: props.hairline,
  23. vertical: props.vertical,
  24. [`content-${props.contentPosition}`]: !!slots.default && !props.vertical
  25. })
  26. }, [!props.vertical && ((_a = slots.default) == null ? void 0 : _a.call(slots))]);
  27. };
  28. }
  29. });
  30. export {
  31. stdin_default as default,
  32. dividerProps
  33. };