UNPKG

@chief-editor/ui

Version:

UI Component for chief editor

1 lines 1.14 kB
var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,r=1,s=arguments.length;r<s;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},__rest=this&&this.__rest||function(e,t){var r={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(r[s[i]]=e[s[i]])}return r};import{classnames}from"@co-hooks/util";import React from"react";import{usePrefixCls}from"../../hooks/usePrefixCls";export function Divider(e){var t=e.children,r=e.className,s=e.type,i=void 0===s?"horizontal":s,n=e.orientation,o=void 0===n?"":n,a=e.dashed,l=__rest(e,["children","className","type","orientation","dashed"]),c=classnames(usePrefixCls("divider",{type:i,dashed:a,orientation:o}),r),p=usePrefixCls("divider-inner-text");return React.createElement("div",__assign({},l,{className:c}),t&&React.createElement("div",{className:p},t))}