import { indigo } from '@material-ui/core/colors'; import React from 'react'; declare global { interface Props {} interface Window { wp:any, lodash:any } interface Math { round:(x: number) => number } } const CustomToggle:React.FC<{ title:string,attrname:string,attrval:any,width?:string,className?:string,style?:any,setAttributes:any }> = props => { const {title,attrname,attrval,width="6",className="",style={},setAttributes=()=>{}} = props; let w = Math.round((parseInt(width)/12)*100)+'%' return (