-
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.
Feat(web-twig): Add Components into bundle & refactoring (refs #DS-87)
- Loading branch information
Showing
19 changed files
with
352 additions
and
73 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
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
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
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
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,34 @@ | ||
# Button | ||
|
||
This is Twig implementation of the [Button] component. | ||
|
||
## Examples | ||
pure implementation: | ||
```twig | ||
{% embed "@spirit/button.twig" with { props: { | ||
color: 'primary' | ||
}} %} | ||
{% block content %} | ||
Primary buttom | ||
{% endblock %} | ||
{% endembed %} | ||
``` | ||
|
||
With Html syntax lexer (enabled by default): | ||
```twig | ||
<Button color="primary">Primary buttom</Button> | ||
``` | ||
|
||
## Available props | ||
|
||
| name | type | default value | description | | ||
|------------|-----------|---------------|-------------------------------------------------| | ||
| color | `string` | primary | its possible to use all theme colors | | ||
| block | `boolean` | false | span the full width of a parent | | ||
| square | `boolean` | false | if the button only has an icon | | ||
| disabled | `boolean` | false | it specifies that the button should be disabled.| | | ||
| type | `string` | button | type of button (submit or button) | | ||
| ariaLabel | `string` | undefined | Accessible Rich Internet Applications label | | ||
| onClick | `string` | undefined | Execute a JavaScript when a button is clicked | | ||
|
||
[Button]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/web/src/components/Button |
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,30 @@ | ||
# Tag | ||
|
||
This is Twig implementation of the [Tag] component. | ||
|
||
## Examples | ||
pure implementation: | ||
```twig | ||
{% embed "@spirit/tag.twig" with { props: { | ||
color: 'default' | ||
theme: 'dark' | ||
}} %} | ||
{% block content %} | ||
Tag content | ||
{% endblock %} | ||
{% endembed %} | ||
``` | ||
|
||
With Html syntax lexer (enabled by default): | ||
```twig | ||
<Tag color="default" theme="dark">Tag content</Tag> | ||
``` | ||
|
||
## Available props | ||
|
||
| name | type | default value | | ||
|------------|-----------|---------------| | ||
| color | `string` | default | | ||
| theme | `string` | dark | | ||
|
||
[Tag]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/web/src/components/Tag |
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,5 @@ | ||
parameters: | ||
level: 9 | ||
paths: | ||
- src | ||
- tests |
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
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
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
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
Oops, something went wrong.