import React from 'react'; import { IShapePath, IWidgetIcon } from '@vev/utils'; import { isArray } from 'lodash'; interface ShapePreviewProps { shape: IWidgetIcon | IShapePath; className?: string; } export function SilkeShape({ shape, className = 'fill' }: ShapePreviewProps) { if (!shape) return null; if (!isArray(shape) && shape.type) return ; const [width, height, ...path] = isArray(shape) ? shape : (shape.value as IShapePath); return ( {path.map((d, index) => ( ))} ); }