Skip to content

Commit

Permalink
Resolve some undefined issues in navigation color's
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Thulin committed Aug 11, 2023
1 parent 5c4c9e3 commit 4f58297
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions source/php/Component/Nav/style/default.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@
'href' => $item['href'],
])
@icon([
'icon' => $item['icon']['icon'],
'size' => $item['icon']['size'],
'classList' => $item['icon']['classList'],
'attributeList' => ['style' => $item['color'] ? 'background-color:' . $item['color'] . ';' : '']
'icon' => $item['icon']['icon'] ?? null,
'size' => $item['icon']['size'] ?? null,
'classList' => $item['icon']['classList'] ?? [],
'attributeList' => [
'style' => 'background-color:' . ($item['color'] ?? '') . ';'
]
])
@endicon
<span class="{{$baseClass}}__text" style="{{$item['color'] ? 'color:' . $item['color'] . ';' : ''}}">{{$item['label']}}</span>
<span
class="{{$baseClass}}__text"
style="{{isset($item['color']) ? 'color:' . $item['color'] . ';' : ''}}">
{{$item['label']}}
</span>
@endlink
@else
<!-- Hidden link: Both label and icon is missing -->
Expand Down

0 comments on commit 4f58297

Please sign in to comment.