2023-11-28 16:26:54 -05:00

23 lines
472 B
Plaintext

---
import { SchemaTools } from '../../schema_utils';
import Breadcrumb from './Breadcrumb.astro';
import Content from './Content.astro';
interface Props {
fileName: string;
def: string;
}
const { fileName, def } = Astro.props;
const schema = SchemaTools.readSchema(fileName);
const defs = SchemaTools.getDefs(schema);
const targetDef = defs.find(d => d.slug === def);
---
<Breadcrumb schema={targetDef!} />
<Content schema={targetDef!} level={0} isDef />