import {
CogIcon,
CpuChipIcon,
DocumentIcon,
InformationCircleIcon,
} from '@heroicons/react/24/outline';
import { DocumentMetadata } from '@nx/nx-dev/models-document';
import { FileMetadata } from '@nx/nx-dev/models-package';
import { renderMarkdown } from '@nx/nx-dev/ui-markdoc';
import Link from 'next/link';
import React from 'react';
export function DocumentList({
documents,
}: {
documents: DocumentMetadata[];
}): JSX.Element {
return (
{!!documents.length ? (
documents.map((guide) => (
))
) : (
)}
);
}
function DocumentListItem({
document,
}: {
document: DocumentMetadata;
}): JSX.Element {
return (
);
}
export function SchemaList({
files,
type,
}: {
files: FileMetadata[];
type: 'executor' | 'generator';
}): JSX.Element {
return (
{!!files.length ? (
files.map((schema) => (
))
) : (
)}
);
}
function SchemaListItem({ file }: { file: FileMetadata }): JSX.Element {
return (
{file.type === 'executor' ? (
) : (
)}
{file.name}
{file.hidden && (
Internal
)}
{
renderMarkdown(file.description, {
filePath: '',
}).node
}
);
}
function EmptyList({
type,
}: {
type: 'executor' | 'generator' | 'document';
}): JSX.Element {
return (
No{' '}
{type} available for this package yet!
);
}