mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-01-28 07:43:18 +00:00
🎨 Add new Flux icons: implement multiple reusable icon components (e.g., hand-raised, hand-thumb-up, heart, hashtag, home) with variant support for improved UI consistency.
This commit is contained in:
31
resources/views/flux/link.blade.php
Normal file
31
resources/views/flux/link.blade.php
Normal file
@@ -0,0 +1,31 @@
|
||||
@blaze
|
||||
|
||||
@props([
|
||||
'as' => null,
|
||||
'external' => null,
|
||||
'accent' => true,
|
||||
'variant' => null,
|
||||
'strong' => false,
|
||||
])
|
||||
|
||||
@php
|
||||
$classes = Flux::classes()
|
||||
->add('inline font-medium')
|
||||
->add('underline-offset-[6px] hover:decoration-current')
|
||||
->add(match ($variant) {
|
||||
'ghost' => 'no-underline hover:underline',
|
||||
'subtle' => 'no-underline',
|
||||
default => 'underline',
|
||||
})
|
||||
->add('[[data-color]>&]:text-inherit [[data-color]>&]:decoration-current/20 dark:[[data-color]>&]:decoration-current/50 [[data-color]>&]:hover:decoration-current')
|
||||
->add(match ($variant) {
|
||||
'subtle' => 'text-zinc-500 dark:text-white/70 hover:text-zinc-800 dark:hover:text-white',
|
||||
default => match ($accent) {
|
||||
true => 'text-[var(--color-accent-content)] decoration-[color-mix(in_oklab,var(--color-accent-content),transparent_80%)]',
|
||||
false => 'text-zinc-800 dark:text-white decoration-zinc-800/20 dark:decoration-white/20',
|
||||
},
|
||||
})
|
||||
;
|
||||
@endphp
|
||||
{{-- NOTE: It's important that this file has NO newline at the end of the file. --}}
|
||||
<?php if ($as !== 'button') : ?><a {{ $attributes->class($classes) }} data-flux-link <?php if ($external) : ?>target="_blank"<?php endif; ?>>{{ $slot }}</a><?php else : ?><button {{ $attributes->merge(['class' => $classes, 'type' => 'button']) }} data-flux-link>{{ $slot }}</button><?php endif; ?>
|
||||
Reference in New Issue
Block a user