Skip to content

Commit

Permalink
[BootstrapAdminUi] Add boolean grid field (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
loic425 authored Jan 17, 2025
2 parents e85bcd1 + f7258c7 commit fb523c0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% import "@SyliusBootstrapAdminUi/shared/helper/field/boolean.html.twig" as boolean %}

{{ boolean.default(data) }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% macro default(data) %}
{% if true == data %}
<div class="text-center" {{ sylius_test_html_attribute('status-enabled') }}>{{ ux_icon('tabler:check', {'class': 'icon text-green'}) }}</div>
{% else %}
<div class="text-center" {{ sylius_test_html_attribute('status-disabled') }}>{{ ux_icon('tabler:x', {'class': 'icon icon-sm text-secondary'}) }}</div>
{% endif %}
{% endmacro %}

0 comments on commit fb523c0

Please sign in to comment.