Skip to content

Commit

Permalink
Fix(web-twig): Set right order of filters
Browse files Browse the repository at this point in the history
  * it fails when prop does not exists
  • Loading branch information
literat committed Jul 30, 2022
1 parent 5f94b44 commit 6d7cde2
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 21 deletions.
1 change: 1 addition & 0 deletions packages/web-twig/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Refactor components and update their readme
- Chore: Require v2 of twigx-bundle and remove minimum stability flag
- Fix: Add missing service registration for ComponentLexer
Fix: Set right order of filters

## 1.8.0 - 2022-07-18
- Update `Tag` - add sizes, split theme and color classes, allow elementType change
Expand Down
6 changes: 3 additions & 3 deletions packages/web-twig/src/Resources/components/Button/Button.twig
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{# API #}
{%- set _class = props.class | default(null) -%}
{%- set _color = props.color | default('primary') -%}
{%- set _isBlock = props.isBlock | boolprop | default(false) -%}
{%- set _isDisabled = props.isDisabled | boolprop | default(false) -%}
{%- set _isSquare = props.isSquare | boolprop | default(false) -%}
{%- set _isBlock = props.isBlock | default(false) | boolprop -%}
{%- set _isDisabled = props.isDisabled | default(false) | boolprop -%}
{%- set _isSquare = props.isSquare | default(false) | boolprop -%}
{%- set _onClick = props.onClick | default(null) -%}
{%- set _type = props.type | default('button') -%}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
{%- set _class = props.class | default(null) -%}
{%- set _color = props.color | default('primary') -%}
{%- set _href = props.href -%}
{%- set _isBlock = props.isBlock | boolprop | default(false) -%}
{%- set _isDisabled = props.isDisabled | boolprop | default(false) -%}
{%- set _isSquare = props.isSquare | boolprop | default(false) -%}
{%- set _isBlock = props.isBlock | default(false) | boolprop -%}
{%- set _isDisabled = props.isDisabled | default(false) | boolprop -%}
{%- set _isSquare = props.isSquare | default(false) | boolprop -%}
{%- set _onClick = props.onClick | default(null) -%}
{%- set _target = props.target | default(null) -%}
{%- set _title = props.title | default(null) -%}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{# API #}
{%- set _class = props.class | default(null) -%}
{%- set _id = props.id | default(null) -%}
{%- set _isChecked = props.isChecked | boolprop | default(false) -%}
{%- set _isDisabled = props.isDisabled | boolprop | default(false) -%}
{%- set _isLabelHidden = props.isLabelHidden | boolprop | default(false) -%}
{%- set _isRequired = props.isRequired | boolprop | default(false) -%}
{%- set _isChecked = props.isChecked | default(false) | boolprop -%}
{%- set _isDisabled = props.isDisabled | default(false) | boolprop -%}
{%- set _isLabelHidden = props.isLabelHidden | default(false) | boolprop -%}
{%- set _isRequired = props.isRequired | default(false) | boolprop -%}
{%- set _label = props.label | default(null) -%}
{%- set _message = props.message | default(null) -%}
{%- set _name = props.name | default(null) -%}
Expand Down
5 changes: 2 additions & 3 deletions packages/web-twig/src/Resources/components/Link/Link.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
{%- set _class = props.class | default(null) -%}
{%- set _color = props.color | default('primary') -%}
{%- set _href = props.href -%}
{%- set _isDisabled = props.isDisabled | boolprop | default(false) -%}
{%- set _isUnderlined = props.isUnderlined | boolprop | default(false) -%}
{%- set _isDisabled = props.isDisabled | default(false) | boolprop -%}
{%- set _isUnderlined = props.isUnderlined | default(false) | boolprop -%}
{%- set _onClick = props.onClick | default(null) -%}
{%- set _target = props.target | default(null) -%}
{%- set _title = props.title | default(null) -%}
Expand Down Expand Up @@ -32,4 +32,3 @@
>
{%- block content %}{% endblock %}
</a>

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{%- set _class = props.class | default(null) -%}
{%- set _href = props.href | default(null) -%}
{%- set _id = props.id | default(null) -%}
{%- set _isSelected = props.isSelected | boolprop | default(false) -%}
{%- set _isSelected = props.isSelected | default(false) | boolprop -%}

{# Class names #}
{%- set _isSelectedClassName = _isSelected ? 'is-selected' : null -%}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{# API #}
{%- set _class = props.class | default(null) -%}
{%- set _id = props.id | default(null) -%}
{%- set _isDisabled = props.isDisabled | boolprop | default(false) -%}
{%- set _isFluid = props.isFluid | boolprop | default(false) -%}
{%- set _isLabelHidden = props.isLabelHidden | boolprop | default(false) -%}
{%- set _isRequired = props.isRequired | boolprop | default(false) -%}
{%- set _isDisabled = props.isDisabled | default(false) | boolprop -%}
{%- set _isFluid = props.isFluid | default(false) | boolprop -%}
{%- set _isLabelHidden = props.isLabelHidden | default(false) | boolprop -%}
{%- set _isRequired = props.isRequired | default(false) | boolprop -%}
{%- set _label = props.label -%}
{%- set _message = props.message | default(null) -%}
{%- set _name = props.name | default(null) -%}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
<html><body>
<a href="/" class="link link-primary"> Example link
</a>

<a href="/" class="link link-secondary link-underlined"> Example link
</a>

<a href="/" class="link link-primary link-disabled link-underlined"> Example link
</a>

</body></html>

0 comments on commit 6d7cde2

Please sign in to comment.