fix: props for CreateFormBlockInitializers

This commit is contained in:
chenos 2022-04-30 23:28:48 +08:00
parent 42438625d5
commit d2d8bb6e18

View File

@ -5,11 +5,14 @@ import { gridRowColWrap } from '../utils';
export const CreateFormBlockInitializers = (props: any) => { export const CreateFormBlockInitializers = (props: any) => {
const { t } = useTranslation(); const { t } = useTranslation();
const { insertPosition, component } = props;
return ( return (
<SchemaInitializer.Button <SchemaInitializer.Button
wrap={gridRowColWrap} wrap={gridRowColWrap}
title={t('Add block')} title={component ? null : t('Add block')}
icon={'PlusOutlined'} icon={'PlusOutlined'}
insertPosition={insertPosition}
component={component}
items={[ items={[
{ {
type: 'itemGroup', type: 'itemGroup',