mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-01-29 08:53: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:
42
resources/views/flux/accordion/item.blade.php
Normal file
42
resources/views/flux/accordion/item.blade.php
Normal file
@@ -0,0 +1,42 @@
|
||||
@aware([ 'transition' ])
|
||||
|
||||
@props([
|
||||
'transition' => false,
|
||||
'disabled' => false,
|
||||
'expanded' => false,
|
||||
'heading' => null,
|
||||
])
|
||||
|
||||
@php
|
||||
// Support adding the .self modifier to the wire:model directive...
|
||||
if (($wireModel = $attributes->wire('model')) && $wireModel->directive && ! $wireModel->hasModifier('self')) {
|
||||
unset($attributes[$wireModel->directive]);
|
||||
|
||||
$wireModel->directive .= '.self';
|
||||
|
||||
$attributes = $attributes->merge([$wireModel->directive => $wireModel->value]);
|
||||
}
|
||||
|
||||
// Support binding the state to a Livewire property
|
||||
$state = $wireModel?->value ? '$wire.' . $wireModel->value : ($expanded ? 'true' : 'false');
|
||||
|
||||
$classes = Flux::classes()
|
||||
->add('block pt-4 first:pt-0 pb-4 last:pb-0')
|
||||
->add('border-b last:border-b-0 border-zinc-800/10 dark:border-white/10')
|
||||
;
|
||||
@endphp
|
||||
|
||||
<ui-disclosure
|
||||
{{ $attributes->class($classes) }}
|
||||
x-data="{ open: {{ $state }} }"
|
||||
x-model.self="open"
|
||||
data-flux-accordion-item
|
||||
>
|
||||
<?php if ($heading): ?>
|
||||
<flux:accordion.heading>{{ $heading }}</flux:accordion.heading>
|
||||
|
||||
<flux:accordion.content>{{ $slot }}</flux:accordion.content>
|
||||
<?php else: ?>
|
||||
{{ $slot }}
|
||||
<?php endif; ?>
|
||||
</ui-disclosure>
|
||||
Reference in New Issue
Block a user