import React, { MouseEvent, ReactElement } from 'react'; import SButton from '@components/SButton'; import raf from 'raf'; interface State { width: number; height: number; } class TestModal extends React.PureComponent<{}, State> { constructor(props: {}) { super(props); this.state = { width: 100, height: 100 }; this.handleClick = this.handleClick.bind(this); } render(): ReactElement { const { width, height } = this.state; const dynamicStyle = { width: `${width}px`, height: `${height}px`, display: 'flex', justifyContent: 'center', alignItems: 'center', backgroundColor: '#eee' }; return ( <>