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

Small content updates #10

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ export default defineConfig({
directory: "components",
},
},
{
label: "Classes",
autogenerate: {
directory: "classes",
},
},
],
}),
],
Expand Down
8 changes: 4 additions & 4 deletions src/content/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineCollection } from 'astro:content';
import { docsSchema, i18nSchema } from '@astrojs/starlight/schema';
import { defineCollection } from "astro:content";
import { docsSchema, i18nSchema } from "@astrojs/starlight/schema";

export const collections = {
docs: defineCollection({ schema: docsSchema() }),
i18n: defineCollection({ type: 'data', schema: i18nSchema() }),
docs: defineCollection({ schema: docsSchema() }),
i18n: defineCollection({ type: "data", schema: i18nSchema() }),
};
17 changes: 17 additions & 0 deletions src/content/docs/classes/img-outline.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: img-outline
---

import { LinkOut } from "@interledger/docs-design-system";

Use the `img-outline` class to add a border to an image. The border is 1px solid gray with rounded edges and a bit of a drop shadow.

```html
<img
src="/img/snippets/view-keys.png"
alt="Alt text goes here"
class="img-outline"
/>
```

See the <LinkOut href='https://webmonetization.org/docs/intro/web-monetization-flow/'>Web Monetization flow sequence diagram</LinkOut> for an example.
21 changes: 21 additions & 0 deletions src/content/docs/components/snippets.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: Snippet
---

:::danger
HJ is still building out this component to work the way we need it to.
:::

## Usage

Import the `Snippets` component like so:

```jsx
import Snippet from "/src/components/Snippet.astro";
```

Use the `<Snippet>` component within your content like so:

```
<Snippet source='https://raw.githubusercontent.com/interledger/open-payments-snippets/main/incoming-payment/incoming-payment-create.ts' />
```
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"jsx": "react-jsx",
"jsxImportSource": "react"
}
}
}