Skip to content

Commit

Permalink
Add component example to the demo template
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptobench committed Oct 26, 2023
1 parent 5dc423d commit fd3fedb
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/pages/docs/templates/demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,20 @@ syntax.
Keep in mind that this partial syntax root is in the directory specified above.

{% partial file="demo.md" /%}

# How to use the default values component

We came across the need to create a page with all the default values in the SDK, so it was easy for the users
to find them. The page looked blank, so what we came up with was a custom component to make it easier on the eyes.

The component accepts a title and a default value, and everything inside will be rendered as the description, and in here its possible to markdown syntax to for example highlight code.

```markdown {% process=false %}
{% defaultvalue title="allocationExpires" defaultValue="60000 * 60" %}
Specifies the duration after which an allocation expires, in milliseconds. A valid allocation is essential for accepting invoices.
{% /defaultvalue %}
```

{% defaultvalue title="allocationExpires" defaultValue="60000 * 60" %}
Specifies the duration after which an allocation expires, in milliseconds. A valid allocation is essential for accepting invoices.
{% /defaultvalue %}

0 comments on commit fd3fedb

Please sign in to comment.