Skip to content

Commit

Permalink
[resources/views]: Fix the display of boolean examples on the element…
Browse files Browse the repository at this point in the history
…s theme (#887)
  • Loading branch information
dfsmania authored Sep 7, 2024
1 parent 6318f3f commit 18e873f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ class="svg-inline--fa fa-chevron-right fa-fw fa-sm sl-icon" role="img"
@endif
</div>
@endif
@if(!$hasChildren && !is_null($example) && $example != '')
@if(!$hasChildren && !is_null($example) && $example !== '')
<div class="sl-stack sl-stack--horizontal sl-stack--2 sl-flex sl-flex-row sl-items-baseline sl-text-muted">
<span>Example:</span> <!-- <span> important for spacing -->
<div class="sl-flex sl-flex-1 sl-flex-wrap" style="gap: 4px;">
<div class="sl-max-w-full sl-break-all sl-px-1 sl-bg-canvas-tint sl-text-muted sl-rounded sl-border">
{{ is_array($example) ? json_encode($example) : $example }}
{{ is_array($example) || is_bool($example) ? json_encode($example) : $example }}
</div>
</div>
</div>
Expand Down

0 comments on commit 18e873f

Please sign in to comment.