akaunting 3.0 (the last dance)
This commit is contained in:
11
resources/views/components/form/accordion/head.blade.php
Normal file
11
resources/views/components/form/accordion/head.blade.php
Normal file
@ -0,0 +1,11 @@
|
||||
<div class="border-b-2 border-gray-200 {{ ! empty($description) ? ' pb-4' : 'pb-2' }}">
|
||||
<h2 class="lg:text-lg font-medium text-black">
|
||||
{{ $title }}
|
||||
</h2>
|
||||
|
||||
@if (! empty($description))
|
||||
<span class="text-sm font-light text-black">
|
||||
{!! $description !!}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
28
resources/views/components/form/accordion/index.blade.php
Normal file
28
resources/views/components/form/accordion/index.blade.php
Normal file
@ -0,0 +1,28 @@
|
||||
<div {{ ((! $attributes->has('override')) || ($attributes->has('override') && ! in_array('class', explode(',', $attributes->get('override'))))) ? $attributes->merge(['class' => 'mb-14']) : $attributes }}
|
||||
x-data="{ {{ $type }} : {{ ($open) ? "'open'" : "'close'" }} }"
|
||||
>
|
||||
@if (! empty($head) && $head->isNotEmpty())
|
||||
<div class="relative cursor-pointer" x-on:click="{{ $type }} !== 'open' ? {{ $type }} = 'open' : {{ $type }} = 'close'">
|
||||
{!! $head !!}
|
||||
|
||||
<x-icon filled class="absolute right-0 top-0 transition-all transform" :icon="$icon" x-bind:class="{{ $type }} === 'open' ? 'rotate-180' : ''" />
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (! empty($body) && $body->isNotEmpty())
|
||||
<div class="overflow-hidden transition-transform origin-top-left ease-linear duration-100"
|
||||
x-ref="accordion_{{ $type }}"
|
||||
x-bind:class="{{ $type }} == 'open' ? 'h-auto ' : 'scale-y-0 h-0'"
|
||||
>
|
||||
<div class="grid sm:grid-cols-7 gap-x-8 gap-y-6 my-3.5">
|
||||
{!! $body !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (! empty($foot) && $foot->isNotEmpty())
|
||||
<div class="relative__footer">
|
||||
{!! $foot !!}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
Reference in New Issue
Block a user