import React from 'react' ; import { Props , StylePropEditor } from '../style_prop_editor' ; import { DynamicLabelForm } from './dynamic_label_form' ; import { StaticLabelForm } from './static_label_form' ; import { LabelDynamicOptions , LabelStaticOptions } from '../../../../../../common/descriptor_types' ; type LabelEditorProps = Omit < Props < LabelStaticOptions , LabelDynamicOptions > , 'children' > ; export function VectorStyleLabelEditor ( props ) { const labelForm = props . styleProperty . isDynamic ( ) ? ( < DynamicLabelForm { ... props } / > ) : ( < StaticLabelForm { ... props } / > ) ; return < StylePropEditor { ... props } > { labelForm } < /StylePropEditor>; }