Skip to content

Commit

Permalink
Check has icon
Browse files Browse the repository at this point in the history
  • Loading branch information
francoism90 committed Jun 21, 2024
1 parent 522f8d1 commit c479668
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
14 changes: 8 additions & 6 deletions resources/views/actions/button.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
'layer' => 'flex shrink-0 cursor-pointer items-center justify-center',
'label' => 'text-inherit',
'primary' => 'py-1.5 px-3 gap-1 bg-primary-500 rounded border border-primary-500',
'active' => 'text-primary-400 hover:text-primary-300',
'inactive' => 'text-secondary-400 hover:text-primary-400',
'active' => 'text-primary-100 hover:text-primary-100',
'inactive' => 'text-secondary-100 hover:text-primary-100',
'icon' => 'size-6 text-secondary-400',
])
->mergeAttributes($action->getComponentAttributes())
Expand All @@ -20,10 +20,12 @@
])
}}>
@if ($slot->isEmpty())
<x-wireuse::actions-icon
:$action
class:icon="{{ $attributes->classFor('icon') }}"
/>
@if ($action->hasIcon())
<x-wireuse::actions-icon
:$action
class:icon="{{ $attributes->classFor('icon') }}"
/>
@endif

@if ($action->hasLabel())
<span class="{{ $attributes->classFor('label') }}">
Expand Down
10 changes: 6 additions & 4 deletions resources/views/actions/link.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@
])
}}>
@if ($slot->isEmpty())
<x-wireuse::actions-icon
:$action
class:icon="{{ $attributes->classFor('icon') }}"
/>
@if ($action->hasIcon())
<x-wireuse::actions-icon
:$action
class:icon="{{ $attributes->classFor('icon') }}"
/>
@endif

@if ($action->hasLabel())
<span class="{{ $attributes->classFor('label') }}">
Expand Down

0 comments on commit c479668

Please sign in to comment.