@@ -8,25 +8,31 @@ import {
88 Banner ,
99 BannerVariant ,
1010 Body ,
11+ DocumentList ,
1112} from '@mongodb-js/compass-components' ;
1213
1314import { usePreference } from 'compass-preferences-model/provider' ;
1415import toSimplifiedFieldInfo from './to-simplified-field-info' ;
1516import type { CollectionState } from '../../modules/collection-tab' ;
1617import type { SchemaAnalysisState } from '../../schema-analysis-types' ;
1718import type { MockDataGeneratorState } from './types' ;
18- import { Document } from '@mongodb-js/compass-crud ' ;
19+ import HadronDocument from 'hadron-document ' ;
1920
2021interface RawSchemaConfirmationScreenProps {
2122 schemaAnalysis : SchemaAnalysisState ;
2223 fakerSchemaGenerationStatus : MockDataGeneratorState [ 'status' ] ;
2324}
2425
25- const documentContainerStyles = css ( {
26- backgroundColor : palette . gray . light3 ,
27- border : `1px solid ${ palette . gray . light2 } ` ,
28- borderRadius : spacing [ 400 ] ,
29- } ) ;
26+ // note: the "> div" selector works around the lack of a className prop on HadronDocument
27+ const documentContainerStyles = css `
28+ background-color : ${ palette . gray . light3 } ;
29+ border : 1px solid ${ palette . gray . light2 } ;
30+ border-radius : ${ spacing [ 400 ] } px;
31+
32+ > div {
33+ padding : ${ spacing [ 400 ] } px ${ spacing [ 900 ] } px;
34+ }
35+ ` ;
3036
3137const descriptionStyles = css ( {
3238 marginBottom : spacing [ 200 ] ,
@@ -65,12 +71,14 @@ const RawSchemaConfirmationScreen = ({
6571 </ Body >
6672 < Body className = { descriptionStyles } > { descriptionText } </ Body >
6773 < div className = { documentContainerStyles } >
68- < Document
74+ < DocumentList . Document
6975 editable = { false }
70- doc = {
71- enableSampleDocumentPassing
72- ? schemaAnalysis . sampleDocument
73- : toSimplifiedFieldInfo ( schemaAnalysis . processedSchema )
76+ value = {
77+ new HadronDocument (
78+ enableSampleDocumentPassing
79+ ? schemaAnalysis . sampleDocument
80+ : toSimplifiedFieldInfo ( schemaAnalysis . processedSchema )
81+ )
7482 }
7583 />
7684 </ div >
0 commit comments