Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(nxdev): display callout on hidden schemas #12796

Merged
merged 1 commit into from Oct 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 22 additions & 19 deletions nx-dev/feature-package-schema-viewer/src/lib/content.tsx
Expand Up @@ -144,28 +144,31 @@ export function Content({
</div>
</div>

{/* We remove the top description on sub property lookup */}
{!schemaViewModel.subReference && (
<>
<div className="my-6 block rounded-md bg-red-50 p-4 ring-1 ring-red-100 dark:bg-red-900/30 dark:ring-red-900">
<div className="flex">
<div className="flex-shrink-0">
<HandRaisedIcon
className="h-5 w-5 text-red-500"
aria-hidden="true"
/>
</div>
<div className="ml-3">
<div className="mt-0 block text-sm font-medium text-red-600 dark:text-red-400">
Schema for internal use only
</div>
<p className="prose-sm mt-2 block text-red-700 dark:text-red-600">
Please do not extend this schema as it is part of Nx internal
usage.
</p>
{!schemaViewModel.subReference && schemaViewModel.hidden && (
<div className="my-6 block rounded-md bg-red-50 p-4 ring-1 ring-red-100 dark:bg-red-900/30 dark:ring-red-900">
<div className="flex">
<div className="flex-shrink-0">
<HandRaisedIcon
className="h-5 w-5 text-red-500"
aria-hidden="true"
/>
</div>
<div className="ml-3">
<div className="mt-0 block text-sm font-medium text-red-600 dark:text-red-400">
Schema for internal use only
</div>
<p className="prose-sm mt-2 block text-red-700 dark:text-red-600">
Please do not extend this schema as it is part of Nx internal
usage.
</p>
</div>
</div>
</div>
)}

{/* We remove the top description on sub property lookup */}
{!schemaViewModel.subReference && (
<>
<div className="prose prose-slate dark:prose-invert max-w-none">
{vm.markdown}
</div>
Expand Down