-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs(web-twig): Add ButtonLink component documentation
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# ButtonLink | ||
|
||
This is Twig implementation of the [ButtonLink] component. | ||
|
||
## Examples | ||
pure implementation: | ||
```twig | ||
{% embed "@spirit/buttonLink.twig" with { props: { | ||
color: 'primary', | ||
href: '#' | ||
}} %} | ||
{% block content %} | ||
Primary ButtonLink | ||
{% endblock %} | ||
{% endembed %} | ||
``` | ||
|
||
With Html syntax lexer (enabled by default): | ||
```twig | ||
<ButtonLink href="#" color="primary">Primary ButtonLink</ButtonLink> | ||
``` | ||
|
||
## Available props | ||
|
||
| name | type | default value | description | | ||
|-----------|-----------|---------------|---------------------------------------------| | ||
| color | `string` | primary | its possible to use all theme colors | | ||
| href | `string` | # | anchor href link | | ||
| target | `string` | __self | anchor target | | ||
| block | `boolean` | false | span the full width of a parent | | ||
| square | `boolean` | false | if the button only has an icon | | ||
| disabled | `boolean` | false | | | ||
| ariaLabel | `string` | undefined | Accessible Rich Internet Applications label | | ||
| class | `string` | undefined | property to extend with custom classes | | ||
|
||
[Button]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/web/src/components/ButtonLink |