import React from 'react' ; import { Props , StylePropEditor } from '../style_prop_editor' ; import { DynamicIconForm } from './dynamic_icon_form' ; import { StaticIconForm } from './static_icon_form' ; import { IconDynamicOptions , IconStaticOptions } from '../../../../../../common/descriptor_types' ; type IconEditorProps = Omit < Props < IconStaticOptions , IconDynamicOptions > , 'children' > ; export function VectorStyleIconEditor ( props ) { const iconForm = props . styleProperty . isDynamic ( ) ? ( < DynamicIconForm { ... props } / > ) : ( < StaticIconForm { ... props } / > ) ; return < StylePropEditor { ... props } > { iconForm } < /StylePropEditor>; }