add example in how to guide of Header without access to metadata

Signed-off-by: Emma Indal <emma.indahl@gmail.com>
This commit is contained in:
Emma Indal
2021-09-29 14:22:22 +02:00
parent 280954b5c0
commit 37822d0740
+14
View File
@@ -185,6 +185,20 @@ directory at `packages/app/src/components/techdocs`, and import and use it in
/>
```
And if your Header do not need access to specific metadata, you can just use
something like:
```tsx
<Route
path="/docs/:namespace/:kind/:name/*"
element={
<TechDocsReaderPage>
{() => <Header type="documentation" title="Custom Header" />}
</TechDocsReaderPage>
}
/>
```
### Without Search
By default, the TechDocsReaderPage includes a in-context SearchBar where you can