Skip to content

Commit

Permalink
docs(nxdev): display callout on hidden schemas (#12796)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcabanes committed Oct 24, 2022
1 parent 03fbf8e commit 7d2370d
Showing 1 changed file with 22 additions and 19 deletions.
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

1 comment on commit 7d2370d

@vercel
Copy link

@vercel vercel bot commented on 7d2370d Oct 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-git-master-nrwl.vercel.app
nx-dev-nrwl.vercel.app
nx-five.vercel.app
nx.dev

Please sign in to comment.