import React from 'react' ; import { Props , StylePropEditor } from '../style_prop_editor' ; import { DynamicSizeForm } from './dynamic_size_form' ; import { StaticSizeForm } from './static_size_form' ; import { SizeDynamicOptions , SizeStaticOptions } from '../../../../../../common/descriptor_types' ; type SizeEditorProps = Omit < Props < SizeStaticOptions , SizeDynamicOptions > , 'children' > ; export function VectorStyleSizeEditor ( props ) { const sizeForm = props . styleProperty . isDynamic ( ) ? ( < DynamicSizeForm { ... props } / > ) : ( < StaticSizeForm { ... props } / > ) ; return < StylePropEditor { ... props } > { sizeForm } < /StylePropEditor>; }