@@ -2,15 +2,12 @@ import { css } from '@emotion/react';
2
2
import { borderRadius , breakpoints , spacing , theme , typography } from '@expo/styleguide' ;
3
3
import ReactMarkdown from 'react-markdown' ;
4
4
5
- import { InlineCode } from '../base/code' ;
6
-
7
5
import { createPermalinkedComponent } from '~/common/create-permalinked-component' ;
8
6
import { HeadingType } from '~/common/headingManager' ;
9
- import { PDIVHEADER } from '~/components/base/paragraph' ;
10
7
import { APIBox } from '~/components/plugins/APIBox' ;
11
8
import { mdComponents , mdInlineComponents } from '~/components/plugins/api/APISectionUtils' ;
12
9
import { Collapsible } from '~/ui/components/Collapsible' ;
13
- import { CALLOUT } from '~/ui/components/Text' ;
10
+ import { P , CALLOUT , CODE } from '~/ui/components/Text' ;
14
11
15
12
type PropertyMeta = {
16
13
regexHuman ?: string ;
@@ -53,17 +50,19 @@ type AppConfigSchemaProps = {
53
50
schema : Record < string , Property > ;
54
51
} ;
55
52
56
- const Anchor = createPermalinkedComponent ( PDIVHEADER , {
53
+ const Anchor = createPermalinkedComponent ( P , {
57
54
baseNestingLevel : 3 ,
58
55
sidebarType : HeadingType . InlineCode ,
59
56
} ) ;
60
57
61
58
const PropertyName = ( { name, nestingLevel } : { name : string ; nestingLevel : number } ) => (
62
- < Anchor level = { nestingLevel } data-testid = { name } data-heading = "true" >
63
- < InlineCode css = { typography . fontSizes [ 16 ] } > { name } </ InlineCode >
59
+ < Anchor level = { nestingLevel } data-testid = { name } data-heading = "true" css = { propertyNameStyle } >
60
+ < CODE css = { typography . fontSizes [ 16 ] } > { name } </ CODE >
64
61
</ Anchor >
65
62
) ;
66
63
64
+ const propertyNameStyle = css ( { marginBottom : spacing [ 4 ] } ) ;
65
+
67
66
export function formatSchema ( rawSchema : [ string , Property ] [ ] ) {
68
67
const formattedSchema : FormattedProperty [ ] = [ ] ;
69
68
@@ -140,15 +139,15 @@ const AppConfigSchemaPropertiesTable = ({ schema }: AppConfigSchemaProps) => {
140
139
const formattedSchema = formatSchema ( rawSchema ) ;
141
140
142
141
return (
143
- < div >
142
+ < >
144
143
{ formattedSchema . map ( ( formattedProperty , index ) => (
145
144
< AppConfigProperty
146
145
{ ...formattedProperty }
147
146
key = { `${ formattedProperty . name } -${ index } ` }
148
147
nestingLevel = { 0 }
149
148
/>
150
149
) ) }
151
- </ div >
150
+ </ >
152
151
) ;
153
152
} ;
154
153
@@ -166,7 +165,7 @@ const AppConfigProperty = ({
166
165
< APIBox css = { boxStyle } >
167
166
< PropertyName name = { name } nestingLevel = { nestingLevel } />
168
167
< CALLOUT theme = "secondary" data-text = "true" >
169
- Type: < InlineCode > { type || 'undefined' } </ InlineCode >
168
+ Type: < CODE > { type || 'undefined' } </ CODE >
170
169
{ nestingLevel > 0 && (
171
170
< >
172
171
 • Path:{ ' ' }
0 commit comments