mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
docs(button): add description to "Custom element"
This commit is contained in:
parent
e8d4ed0382
commit
15f0e03c43
1 changed files with 4 additions and 0 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue