import React from "react"; import { ErrorBoundary, getFieldConfig, Property, PropertyConfigBadge, useCustomizationController } from "@firecms/core"; import { EditIcon, IconButton, TextField, } from "@firecms/ui"; export function ImportNewPropertyFieldPreview({ propertyKey, property, onEditClick, includeName = true, onPropertyNameChanged, propertyTypeView }: { propertyKey: string | null, property: Property | null includeName?: boolean, onEditClick?: () => void, onPropertyNameChanged?: (propertyKey: string, value: string) => void, propertyTypeView?: React.ReactNode }) { const { propertyConfigs } = useCustomizationController(); const widget = property ? getFieldConfig(property, propertyConfigs) : null; return
{propertyTypeView ?? }
{includeName && { if (onPropertyNameChanged && propertyKey) onPropertyNameChanged(propertyKey, e.target.value); }}/>}
}