Change style of objects inside lists

This commit is contained in:
Misode
2024-10-25 01:23:36 +02:00
parent 18dd627ad8
commit 1f0a3a03a9
3 changed files with 44 additions and 62 deletions

View File

@@ -632,7 +632,11 @@ function ListBody({ type: outerType, node, makeEdit, ctx }: ListBodyProps) {
<Key label="entry" />
<Head type={childType} node={child} makeEdit={makeItemEdit} ctx={ctx} />
</div>
<Body type={childType} node={child} makeEdit={makeItemEdit} ctx={ctx} />
{childType.kind === 'struct'
? <div class="node-body-flat">
<StructBody type={childType} node={child} makeEdit={makeItemEdit} ctx={ctx} />
</div>
: <Body type={childType} node={child} makeEdit={makeItemEdit} ctx={ctx} />}
</div>
})}
{node.children.length > 0 && <div class="node-header">

View File

@@ -306,7 +306,7 @@ export function SchemaGenerator({ gen, allowedVersions }: Props) {
}, [closeFile])
return <>
<main class={`generator${previewShown ? ' has-preview' : ''}${projectShown ? ' has-project' : ''}`}>
<main class={`${previewShown ? 'has-preview' : ''} ${projectShown ? 'has-project' : ''}`}>
{!gen.tags?.includes('partners') && <Ad id="data-pack-generator" type="text" />}
<div class="controls generator-controls">
{gen.wiki && <a class="btn btn-link tooltipped tip-se" aria-label={locale('learn_on_the_wiki')} href={gen.wiki} target="_blank">