@chief-editor/shape
Version:
Shape for chief editor
1 lines • 1.18 kB
JavaScript
var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(t){for(var e,r=1,a=arguments.length;r<a;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},__rest=this&&this.__rest||function(t,e){var r={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&e.indexOf(a)<0&&(r[a]=t[a]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(t);o<a.length;o++)e.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(t,a[o])&&(r[a[o]]=t[a[o]])}return r};import React from"react";export function Pentagram(t){var e=t.width,r=t.height,a=t.ratio,o=void 0===a?"none":a,n=t.strokeWidth,i=void 0===n?0:n,s=t.strokeDasharray,h=__rest(t,["width","height","ratio","strokeWidth","strokeDasharray"]),c=300,p=300;return s&&(c+=i,p+=i),React.createElement("svg",{width:e,height:r,viewBox:-i/2+" "+-i/2+" "+c+" "+p,fill:"none",preserveAspectRatio:o},React.createElement("path",__assign({},h,{strokeDasharray:s,strokeWidth:i,d:"M150 0L185.41 114.59H300L207.295 185.41L242.705 300L150 229.18L57.2949 300L92.7051 185.41L0 114.59H114.59L150 0Z"})))}