Skip to content

Commit

Permalink
docs(button): add description to "Custom element"
Browse files Browse the repository at this point in the history
  • Loading branch information
metonym committed Feb 25, 2024
1 parent e8d4ed0 commit 15f0e03
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/src/pages/components/Button.svx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ If an `href` value is specified, the component will render an [anchor element](h

## Custom element

By default, the `Button` will render either a `button` or `a` element.

If you need to render a different element, set `as` to `true` and spread `let:props` to the element.

<Button as let:props>
<p {...props}>Custom element</p>
</Button>
Expand Down

0 comments on commit 15f0e03

Please sign in to comment.