39 lines
1.6 KiB
PHP
39 lines
1.6 KiB
PHP
|
|
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
||
|
|
|
||
|
|
$__newAttributes = [];
|
||
|
|
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['active' => false, 'icon' => null]));
|
||
|
|
|
||
|
|
foreach ($attributes->all() as $__key => $__value) {
|
||
|
|
if (in_array($__key, $__propNames)) {
|
||
|
|
$$__key = $$__key ?? $__value;
|
||
|
|
} else {
|
||
|
|
$__newAttributes[$__key] = $__value;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
||
|
|
|
||
|
|
unset($__propNames);
|
||
|
|
unset($__newAttributes);
|
||
|
|
|
||
|
|
foreach (array_filter((['active' => false, 'icon' => null]), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
||
|
|
$$__key = $$__key ?? $__value;
|
||
|
|
}
|
||
|
|
|
||
|
|
$__defined_vars = get_defined_vars();
|
||
|
|
|
||
|
|
foreach ($attributes->all() as $__key => $__value) {
|
||
|
|
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
||
|
|
}
|
||
|
|
|
||
|
|
unset($__defined_vars, $__key, $__value); ?>
|
||
|
|
<?php
|
||
|
|
$classes = $active
|
||
|
|
? 'group flex items-center gap-3 px-3 py-2.5 text-sm font-semibold text-indigo-700 bg-indigo-50 border-l-2 border-indigo-600'
|
||
|
|
: 'group flex items-center gap-3 px-3 py-2.5 text-sm font-medium text-slate-600 border-l-2 border-transparent hover:bg-slate-50 hover:text-slate-900';
|
||
|
|
?>
|
||
|
|
<a <?php echo e($attributes->merge(['class' => $classes])); ?>>
|
||
|
|
<?php if($icon): ?><i class="fas <?php echo e($icon); ?> w-5 text-center <?php echo e($active ? 'text-indigo-600' : 'text-slate-400 group-hover:text-slate-600'); ?>"></i><?php endif; ?>
|
||
|
|
<span class="truncate"><?php echo e($slot); ?></span>
|
||
|
|
</a>
|
||
|
|
<?php /**PATH /home/u806112658/domains/earrinasia.com/ilycats/resources/views/components/sidebar-link.blade.php ENDPATH**/ ?>
|