Skip to content

Commit

Permalink
(fix, docs): document frames and endpoint req/res snippets (#3490)
Browse files Browse the repository at this point in the history
* (fix, docs): document frames and endpoint req/res snippets

* add icons
  • Loading branch information
dsinghvi authored Apr 30, 2024
1 parent aa7bc6d commit 7f415b3
Show file tree
Hide file tree
Showing 14 changed files with 78 additions and 791 deletions.
21 changes: 17 additions & 4 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,25 +239,38 @@ navigation:
contents:
- page: Accordion
path: ./pages/docs/components/accordions.mdx
icon: 'square-caret-down'
- page: Accordion Groups
path: ./pages/docs/components/accordion-groups.mdx
icon: table-rows
- page: Callouts
path: ./pages/docs/components/callouts.mdx
icon: 'circle-exclamation'
- page: Cards
path: ./pages/docs/components/cards.mdx
icon: "rectangle"
- page: Card Groups
path: ./pages/docs/components/card-groups.mdx
icon: 'rectangles-mixed'
- page: Code Blocks
path: ./pages/docs/components/code-blocks.mdx
slug: code-blocks
icon: "rectangle-code"
- page: Steps
path: ./pages/docs/components/steps.mdx
icon: 'arrow-progress'
- page: Frames
path: ./pages/docs/components/frames.mdx
icon: 'frame'
- page: Tabs
path: ./pages/docs/components/tabs.mdx
- page: Endpoint Snippets
path: ./pages/fern-docs/components/endpoint-snippets.mdx
- page: Icon
path: ./pages/fern-docs/components/icon.mdx
icon: 'window-restore'
- page: Endpoint Request Snippet
path: ./pages/docs/components/endpoint-request-snippet.mdx
icon: 'turn-up'
- page: Endpoint Response Snippet
path: ./pages/docs/components/endpoint-response-snippet.mdx
icon: 'turn-down'
- tab: api
layout:
- api: API Reference
Expand Down
20 changes: 20 additions & 0 deletions fern/pages/docs/components/endpoint-request-snippet.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: Endpoint Request Snippet
excerpt: Reference an endpoint request from your API Reference
---

The `EndpointRequestSnippet` component is used to reference an endpoint
request from your API Reference. Below is an example of referencing the
request for the `POST /snippets` endpoint.

<EndpointRequestSnippet endpoint='POST /snippets' />

<Aside>

<CodeBlock title="Markdown">
```jsx
<EndpointRequestSnippet endpoint='POST /snippets' />
```
</CodeBlock>

</Aside>
20 changes: 20 additions & 0 deletions fern/pages/docs/components/endpoint-response-snippet.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: Endpoint Response Snippet
excerpt: Reference an endpoint response from your API Reference
---

The `EndpointResponseSnippet` component is used to reference an endpoint
request from your API Reference. Below is an example of referencing the
response for the `POST /snippets` endpoint.

<EndpointResponseSnippet endpoint='POST /snippets' />

<Aside>

<CodeBlock title="Markdown">
```jsx
<EndpointResponseSnippet endpoint='POST /snippets' />
```
</CodeBlock>

</Aside>
21 changes: 21 additions & 0 deletions fern/pages/docs/components/frames.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: 'Frames'
excerpt: 'Wrap images in a container with the frame component'
---

<Frame caption="Beautiful mountains">
<img src="https://images.pexels.com/photos/1867601/pexels-photo-1867601.jpeg" />
</Frame>

<Aside>

<CodeBlocks>
```jsx title="Markdown"
<Frame caption="Beautiful mountains">
// Or a relative path to an image in the project
<img src="https://images.pexels.com/photos/1867601.jpeg" />
</Frame>
```
</CodeBlocks>

</Aside>
50 changes: 0 additions & 50 deletions fern/pages/fern-docs/components/accordion.mdx

This file was deleted.

76 changes: 0 additions & 76 deletions fern/pages/fern-docs/components/availability.mdx

This file was deleted.

Loading

0 comments on commit 7f415b3

Please sign in to comment.