References

A component that renders references to pages.

Basic example

1import { References } from '@markprompt/react';
2
3function Example() {
4  return (
5    <References
6      RootComponent="ul"
7      ReferenceComponent="li"
8      references={[
9        {
10          file: {
11            title: 'References',
12            path: '/docs/sdk/components/references',
13          },
14          meta: {
15            leadHeading: {
16              id: 'component-api',
17              depth: 3,
18              value: 'Component API',
19            },
20          },
21        },
22      ]}
23    />
24  );
25}

Component API

PropTypeDescription
RootComponentElementType = 'ul'The wrapper component to render.
ReferenceComponentElementType = 'li'The component to render for each reference.
referencesFileSectionReference[]The references to display.