import React from 'react' import debounce from 'lodash/debounce' import { Row, Col, Input } from 'antd' const styles = require('../Workbench.less') export interface IframeConfig { src: string } interface IframeSectionProps { title: string config: IframeConfig onChange: (prop: string, value: any) => void } export class IframeSection extends React.PureComponent { private debounceInputChange = null constructor (props: IframeSectionProps) { super(props) this.debounceInputChange = debounce(props.onChange, 1500) } private inputChange = (prop) => (e: React.ChangeEvent) => { this.debounceInputChange(prop, e.target.value) } public render () { const { title, config } = this.props const { src } = config return (

{title}

) } } export default IframeSection