File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed
compass-collection/src/components/mock-data-generator-modal
compass-components/src/components/document-list Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -23,16 +23,15 @@ interface RawSchemaConfirmationScreenProps {
2323 fakerSchemaGenerationStatus : MockDataGeneratorState [ 'status' ] ;
2424}
2525
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 : 1 px solid ${ palette . gray . light2 } ;
30- border-radius : ${ spacing [ 400 ] } px ;
26+ const documentContainerStyles = css ( {
27+ backgroundColor : palette . gray . light3 ,
28+ border : `1px solid ${ palette . gray . light2 } ` ,
29+ borderRadius : spacing [ 400 ] ,
30+ } ) ;
3131
32- > div {
33- padding : ${ spacing [ 400 ] } px ${ spacing [ 900 ] } px;
34- }
35- ` ;
32+ const documentStyles = css ( {
33+ padding : `${ spacing [ 400 ] } px ${ spacing [ 900 ] } px` ,
34+ } ) ;
3635
3736const descriptionStyles = css ( {
3837 marginBottom : spacing [ 200 ] ,
@@ -72,6 +71,7 @@ const RawSchemaConfirmationScreen = ({
7271 < Body className = { descriptionStyles } > { descriptionText } </ Body >
7372 < div className = { documentContainerStyles } >
7473 < DocumentList . Document
74+ className = { documentStyles }
7575 editable = { false }
7676 value = {
7777 new HadronDocument (
Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ const HadronDocument: React.FunctionComponent<{
8888 extraGutterWidth ?: number ;
8989 onUpdateQuery ?: ( field : string , value : unknown ) => void ;
9090 query ?: Record < string , unknown > ;
91+ className ?: string ;
9192} > = ( {
9293 value : document ,
9394 editable = false ,
@@ -96,6 +97,7 @@ const HadronDocument: React.FunctionComponent<{
9697 extraGutterWidth,
9798 onUpdateQuery,
9899 query,
100+ className = '' ,
99101} ) => {
100102 const { elements, visibleElements } = useHadronDocument ( document ) ;
101103 const [ autoFocus , setAutoFocus ] = useState < {
@@ -130,7 +132,7 @@ const HadronDocument: React.FunctionComponent<{
130132 ) ;
131133
132134 return (
133- < div >
135+ < div className = { className } >
134136 < div
135137 className = { hadronDocument }
136138 data-testid = "hadron-document"
You can’t perform that action at this time.
0 commit comments