UNPKG

@chief-editor/shape

Version:

Shape for chief editor

1 lines 1.01 kB
var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)},__rest=this&&this.__rest||function(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(t);n<i.length;n++)e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(t,i[n])&&(r[i[n]]=t[i[n]])}return r};import React from"react";export function Ellipse(t){var e=t.width,r=t.height,i=t.strokeWidth,n=void 0===i?0:i,o=t.strokeDasharray,s=__rest(t,["width","height","strokeWidth","strokeDasharray"]),a=e/2,h=r/2;return o&&(a-=n,h-=n),React.createElement("svg",{width:e,height:r,viewBox:"0 0 "+e+" "+r,fill:"none"},React.createElement("ellipse",__assign({},s,{strokeDasharray:o,strokeWidth:n,cx:e/2,cy:r/2,rx:a,ry:h})))}