mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +00:00
refactoring
This commit is contained in:
@ -5,9 +5,9 @@
|
||||
@endphp
|
||||
|
||||
@if(isset($href))
|
||||
<a href="{{ $href }}" {{ $attributes->merge(['class' => $class]) }}>
|
||||
<button onclick="location.href = '{{ $href }}'" {{ $attributes->merge(['class' => $class]) }}>
|
||||
{{ $slot }}
|
||||
</a>
|
||||
</button>
|
||||
@else
|
||||
<button {{ $attributes->merge(['type' => 'submit', 'class' => $class]) }}>
|
||||
{{ $slot }}
|
||||
|
11
resources/views/components/secondary-sidebar-link.blade.php
Normal file
11
resources/views/components/secondary-sidebar-link.blade.php
Normal file
@ -0,0 +1,11 @@
|
||||
@props(['active'])
|
||||
|
||||
@php
|
||||
$classes = ($active ?? false)
|
||||
? 'h-10 flex items-center justify-start rounded-lg px-3 py-2 hover:bg-gray-100 dark:hover:bg-gray-800 bg-primary-50 dark:bg-primary-500 dark:bg-opacity-20 text-primary-500 font-semibold'
|
||||
: 'h-10 flex items-center justify-start rounded-lg px-3 py-2 hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-800 dark:text-gray-300 font-semibold';
|
||||
@endphp
|
||||
|
||||
<a {{ $attributes->merge(['class' => $classes]) }}>
|
||||
{{ $slot }}
|
||||
</a>
|
@ -2,8 +2,8 @@
|
||||
|
||||
@php
|
||||
$classes = ($active ?? false)
|
||||
? 'text-md font-semibold flex items-center text-primary-500 transition duration-150 ease-in-out mb-4'
|
||||
: 'text-md font-semibold flex items-center hover:text-primary-600 text-gray-600 dark:text-gray-500 transition duration-150 ease-in-out mb-4';
|
||||
? 'h-10 rounded-md px-4 py-3 text-md font-semibold flex items-center bg-gray-900 text-primary-500 transition duration-150 ease-in-out transition-all duration-100'
|
||||
: 'h-10 rounded-md px-4 py-3 text-md font-semibold flex items-center text-gray-500 transition duration-150 ease-in-out transition-all duration-100 hover:bg-gray-900';
|
||||
@endphp
|
||||
|
||||
<a {{ $attributes->merge(['class' => $classes]) }}>
|
||||
|
Reference in New Issue
Block a user