import React from 'react' import { ISpecConfig } from './types' import { LineSection, PieSection, FunnelSection, MapSection, ParallelSection, SankeySection, DoubleYAxisSection } from './specs' interface ISpecSectionProps { name: string title: string config: ISpecConfig onChange: (value: string | number, propPath: string[]) => void isLegendSection: boolean } export class SpecSection extends React.PureComponent { private static readonly BasePropPath = ['spec'] private specChange = ( value: string | number, propPath: string | string[] ) => { this.props.onChange(value, SpecSection.BasePropPath.concat(propPath)) } public render () { const { name, title, config, isLegendSection } = this.props let renderHtml: JSX.Element switch (name) { case 'line': renderHtml = break case 'pie': renderHtml = break case 'funnel': renderHtml = break case 'map': renderHtml = break case 'parallel': renderHtml = break case 'sankey': renderHtml = break case 'doubleYAxis': renderHtml = break default: renderHtml =
break } return renderHtml } } export default SpecSection