Default types and templates
This commit is contained in:
@@ -14,8 +14,8 @@ export const SchemaViewer: FC<IProps> = ({ schema, onTypeClick }) => {
|
||||
return 'Constant value:'
|
||||
}
|
||||
switch (field.type) {
|
||||
case FieldTypes.type: return 'Type'
|
||||
case FieldTypes.dice: return 'Dice'
|
||||
case FieldTypes.type: return 'Type:'
|
||||
case FieldTypes.dice: return 'Dice:'
|
||||
default: return '';
|
||||
}
|
||||
}, [])
|
||||
@@ -25,6 +25,19 @@ export const SchemaViewer: FC<IProps> = ({ schema, onTypeClick }) => {
|
||||
{/* <div className="whitespace-pre-wrap">{JSON.stringify(schema, null, 2)}</div> */}
|
||||
<div>
|
||||
<p className="font-bold text-lg">{schema.name}</p>
|
||||
<hr />
|
||||
<p className="font-bold italic">Templates</p>
|
||||
<ul>
|
||||
{Object.entries(schema.templates).map(([templateKey, template]) => (
|
||||
<li>
|
||||
<p className="font-bold">{templateKey}</p>
|
||||
<p className="font-thin text-xs">{template.type}</p>
|
||||
{template.publishable && <p className="font-thin text-xs">This template can create publications</p>}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
<hr />
|
||||
<p className="font-bold italic">Types</p>
|
||||
<ul className="rounded-lg overflow-hidden">
|
||||
{Object.entries(schema.types).map(([typeKey, type]) => (
|
||||
<li
|
||||
|
Reference in New Issue
Block a user