2 lines
3.0 KiB
JavaScript
2 lines
3.0 KiB
JavaScript
|
import t,{Component as e}from"react";import{classNames as r}from"primereact/utils";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function i(t,e){return i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},i(t,e)}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&i(t,e)}function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t,e){if(e&&("object"===p(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return l(t)}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var f,y,h,d=function(i){c(b,e);var p,l,f,y,h,d=(p=b,l=u(),function(){var t,e=a(p);if(l){var r=a(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return s(this,t)});function b(){return o(this,b),d.apply(this,arguments)}return f=b,(y=[{key:"isHorizontal",get:function(){return"horizontal"===this.props.layout}},{key:"isVertical",get:function(){return"vertical"===this.props.layout}},{key:"render",value:function(){var e=r("p-divider p-component p-divider-".concat(this.props.layout," p-divider-").concat(this.props.type),{"p-divider-left":this.isHorizontal&&(!this.props.align||"left"===this.props.align),"p-divider-right":this.isHorizontal&&"right"===this.props.align,"p-divider-center":this.isHorizontal&&"center"===this.props.align||this.isVertical&&(!this.props.align||"center"===this.props.align),"p-divider-top":this.isVertical&&"top"===this.props.align,"p-divider-bottom":this.isVertical&&"bottom"===this.props.align},this.props.className);return t.createElement("div",{className:e,style:this.props.style,role:"separator"},t.createElement("div",{className:"p-divider-content"},this.props.children))}}])&&n(f.prototype,y),h&&n(f,h),Object.defineProperty(f,"prototype",{writable:!1}),b}();h={align:null,layout:"horizontal",type:"solid",style:null,className:null},(y="defaultProps")in(f=d)?Object.defineProperty(f,y,{value:h,enumerable:!0,configurable:!0,writable:!0}):f[y]=h;export{d as Divider};
|