index.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. "use strict";
  2. var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
  3. exports.__esModule = true;
  4. exports.default = void 0;
  5. var _babelHelperVueJsxMergeProps = _interopRequireDefault(require("@vue/babel-helper-vue-jsx-merge-props"));
  6. var _utils = require("../utils");
  7. var _functional = require("../utils/functional");
  8. // Utils
  9. var _createNamespace = (0, _utils.createNamespace)('divider'),
  10. createComponent = _createNamespace[0],
  11. bem = _createNamespace[1];
  12. function Divider(h, props, slots, ctx) {
  13. var _bem;
  14. return h("div", (0, _babelHelperVueJsxMergeProps.default)([{
  15. "attrs": {
  16. "role": "separator"
  17. },
  18. "style": {
  19. borderColor: props.borderColor
  20. },
  21. "class": bem((_bem = {
  22. dashed: props.dashed,
  23. hairline: props.hairline
  24. }, _bem["content-" + props.contentPosition] = slots.default, _bem))
  25. }, (0, _functional.inherit)(ctx, true)]), [slots.default && slots.default()]);
  26. }
  27. Divider.props = {
  28. dashed: Boolean,
  29. hairline: {
  30. type: Boolean,
  31. default: true
  32. },
  33. contentPosition: {
  34. type: String,
  35. default: 'center'
  36. }
  37. };
  38. var _default = createComponent(Divider);
  39. exports.default = _default;