Skip to content

Commit

Permalink
docs: mi/50/details-component (#528)
Browse files Browse the repository at this point in the history
* docs: mi/50/details-component

- Replace disclosure component with details tag in ts-prerequisites and js-prerequisites
- Remove Disclosure import from mdx files
- Remove references to Disclosure component in README.md and code-snippets-template.mdx

* docs: mi/50/details-component
  • Loading branch information
hajjimo authored Dec 9, 2024
1 parent e844c53 commit ff37af4
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 25 deletions.
5 changes: 2 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ Refer to the Starlight documentation on [authoring content](https://starlight.as
We have extracted some of the commonly repeated patterns within the documentation pages into custom docs components that can be reused. There are components which are shared across all our Starlight documentation sites and those which are specific to this project only. This will determine what the import path is.

- CodeBlock (Shared)
- Disclosure (Shared)
- Hidden (Shared)
- LargeImg (Shared)
- LinkOut (Shared)
Expand All @@ -72,10 +71,10 @@ We have extracted some of the commonly repeated patterns within the documentatio
- [FullSnippet](#fullsnippet-component) (Project-specific)
- [ChunkedSnippet](#chunkedsnippet-component) (Project-specific)

For the shared components, if you are using both `CodeBlock` and `Disclosure` on the same page, you can import them both like so:
For the shared components, if you are using both `CodeBlock` and `Tooltip` on the same page, you can import them both like so:

```jsx
import { CodeBlock, Disclosure } from '@interledger/docs-design-system'
import { CodeBlock, Tooltip } from '@interledger/docs-design-system'
```

For more information about importing things in Javascript, please refer to [import on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import).
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/snippets/grant-continue.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Continue a grant request
---

import { Disclosure, CodeBlock, LinkOut } from '@interledger/docs-design-system'
import { CodeBlock, LinkOut } from '@interledger/docs-design-system'
import { Tabs, TabItem } from '@astrojs/starlight/components'
import ChunkedSnippet from '/src/components/ChunkedSnippet.astro'
import Begin from '/src/partials/before-you-begin.mdx'
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/snippets/grant-create.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Create a grant request
---

import { Disclosure, CodeBlock, LinkOut } from '@interledger/docs-design-system'
import { CodeBlock, LinkOut } from '@interledger/docs-design-system'
import { Tabs, TabItem } from '@astrojs/starlight/components'
import ChunkedSnippet from '/src/components/ChunkedSnippet.astro'
import Begin from '/src/partials/before-you-begin.mdx'
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/snippets/grant-revoke.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Revoke a grant request
---

import { Disclosure, CodeBlock, LinkOut } from '@interledger/docs-design-system'
import { CodeBlock, LinkOut } from '@interledger/docs-design-system'
import { Tabs, TabItem } from '@astrojs/starlight/components'
import ChunkedSnippet from '/src/components/ChunkedSnippet.astro'
import Begin from '/src/partials/before-you-begin.mdx'
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/snippets/incoming-complete.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Complete an incoming payment
---

import { Disclosure, CodeBlock, LinkOut } from '@interledger/docs-design-system'
import { CodeBlock, LinkOut } from '@interledger/docs-design-system'
import { Tabs, TabItem } from '@astrojs/starlight/components'
import ChunkedSnippet from '/src/components/ChunkedSnippet.astro'
import Begin from '/src/partials/before-you-begin.mdx'
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/snippets/incoming-create.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Create an incoming payment
---

import { Disclosure, CodeBlock, LinkOut } from '@interledger/docs-design-system'
import { CodeBlock, LinkOut } from '@interledger/docs-design-system'
import { Tabs, TabItem } from '@astrojs/starlight/components'
import ChunkedSnippet from '/src/components/ChunkedSnippet.astro'
import Begin from '/src/partials/before-you-begin.mdx'
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/snippets/incoming-get.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Get an incoming payment
---

import { Disclosure, CodeBlock, LinkOut } from '@interledger/docs-design-system'
import { CodeBlock, LinkOut } from '@interledger/docs-design-system'
import { Tabs, TabItem } from '@astrojs/starlight/components'
import ChunkedSnippet from '/src/components/ChunkedSnippet.astro'
import Begin from '/src/partials/before-you-begin.mdx'
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/snippets/incoming-list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: List incoming payments
---

import { Disclosure, CodeBlock, LinkOut } from '@interledger/docs-design-system'
import { CodeBlock, LinkOut } from '@interledger/docs-design-system'
import { Tabs, TabItem } from '@astrojs/starlight/components'
import ChunkedSnippet from '/src/components/ChunkedSnippet.astro'
import Begin from '/src/partials/before-you-begin.mdx'
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/snippets/outgoing-create.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Create an outgoing payment
---

import { Disclosure, CodeBlock, LinkOut } from '@interledger/docs-design-system'
import { CodeBlock, LinkOut } from '@interledger/docs-design-system'
import { Tabs, TabItem } from '@astrojs/starlight/components'
import ChunkedSnippet from '/src/components/ChunkedSnippet.astro'
import Begin from '/src/partials/before-you-begin.mdx'
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/snippets/outgoing-list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: List outgoing payments
---

import { Disclosure, CodeBlock, LinkOut } from '@interledger/docs-design-system'
import { CodeBlock, LinkOut } from '@interledger/docs-design-system'
import { Tabs, TabItem } from '@astrojs/starlight/components'
import ChunkedSnippet from '/src/components/ChunkedSnippet.astro'
import Begin from '/src/partials/before-you-begin.mdx'
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/snippets/quote-create.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Create a quote
---

import { Disclosure, CodeBlock, LinkOut } from '@interledger/docs-design-system'
import { CodeBlock, LinkOut } from '@interledger/docs-design-system'
import { Tabs, TabItem } from '@astrojs/starlight/components'
import ChunkedSnippet from '/src/components/ChunkedSnippet.astro'
import Begin from '/src/partials/before-you-begin.mdx'
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/snippets/quote-get.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Get a quote
---

import { Disclosure, CodeBlock, LinkOut } from '@interledger/docs-design-system'
import { CodeBlock, LinkOut } from '@interledger/docs-design-system'
import { Tabs, TabItem } from '@astrojs/starlight/components'
import ChunkedSnippet from '/src/components/ChunkedSnippet.astro'
import Begin from '/src/partials/before-you-begin.mdx'
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/snippets/wallet-get-keys.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Get keys bound to a wallet address
---

import { Disclosure, CodeBlock, LinkOut } from '@interledger/docs-design-system'
import { CodeBlock, LinkOut } from '@interledger/docs-design-system'
import { Tabs, TabItem } from '@astrojs/starlight/components'
import ChunkedSnippet from '/src/components/ChunkedSnippet.astro'
import Begin from '/src/partials/before-you-begin.mdx'
Expand Down
9 changes: 5 additions & 4 deletions docs/src/partials/code-snippets-template.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Change this title
---

import { Disclosure, CodeBlock } from '@interledger/docs-design-system'
import { CodeBlock } from '@interledger/docs-design-system'
import { Tabs, TabItem } from '@astrojs/starlight/components'
import FullSnippet from '/src/components/FullSnippet.astro'
import ChunkedSnippet from '/src/components/ChunkedSnippet.astro'
Expand Down Expand Up @@ -30,9 +30,10 @@ import Ts from '/src/partials/ts-prerequisites.mdx'
</TabItem>
</Tabs>

<Disclosure toggleText='View full source' client:load>
<details>
<summary>View full source</summary>

Delete the contents of this disclosure and replace it with a link to the raw source
Delete the contents of this details tag and replace it with a link to the raw source
file like so:

```html
Expand All @@ -41,7 +42,7 @@ file like so:
/>
```

</Disclosure>
</details>

## References

Expand Down
7 changes: 4 additions & 3 deletions docs/src/partials/js-prerequisites.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { LinkOut, Disclosure } from '@interledger/docs-design-system'
import { LinkOut } from '@interledger/docs-design-system'

<Disclosure toggleText='Prerequisites' client:load>
<details>
<summary>Prerequisites</summary>

- Node 18 or higher
- A package manager such as NPM or PNPM
Expand All @@ -12,4 +13,4 @@ import { LinkOut, Disclosure } from '@interledger/docs-design-system'

Add `"type": "module"` to `package.json`

</Disclosure>
</details>
7 changes: 4 additions & 3 deletions docs/src/partials/ts-prerequisites.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { LinkOut, Disclosure } from '@interledger/docs-design-system'
import { LinkOut } from '@interledger/docs-design-system'

<Disclosure toggleText='Prerequisites' client:load>
<details>
<summary>Prerequisites</summary>

- Node 18
- A package manager such as NPM or PNPM
Expand All @@ -24,4 +25,4 @@ Add the following to `tsconfig.json`
}
```

</Disclosure>
</details>

0 comments on commit ff37af4

Please sign in to comment.