mirror of
https://github.com/ershisan99/coolify.git
synced 2026-01-03 12:34:08 +00:00
css and stuffs
This commit is contained in:
@@ -1,17 +1,30 @@
|
||||
@props([
|
||||
'type' => $attributes->get('type') ?? 'button',
|
||||
'disabled' => null,
|
||||
'confirm' => null,
|
||||
'confirmAction' => null,
|
||||
])
|
||||
<button {{ $attributes }}
|
||||
@if ($attributes->whereStartsWith('wire:click') && !$disabled) wire:target="{{ explode('(', $attributes->whereStartsWith('wire:click')->first())[0] }}"
|
||||
wire:loading.delay.class='loading' wire:loading.delay.attr="disabled" @endif
|
||||
@if ($disabled !== null) disabled title="{{ $disabled }}" @endif
|
||||
@isset($confirm)
|
||||
@if ($type === 'submit')
|
||||
<button type="submit" @if ($disabled !== null) disabled @endif wire:target="submit"
|
||||
wire:loading.delay.shorter.class="loading"
|
||||
@isset($confirm)
|
||||
x-on:click="toggleConfirmModal('{{ $confirm }}', '{{ explode('(', $confirmAction)[0] }}')"
|
||||
@endisset
|
||||
@isset($confirmAction)
|
||||
@isset($confirmAction)
|
||||
x-on:{{ explode('(', $confirmAction)[0] }}.window="$wire.{{ explode('(', $confirmAction)[0] }}"
|
||||
@endisset>
|
||||
{{ $slot }}
|
||||
</button>
|
||||
{{ $slot }}
|
||||
</button>
|
||||
@elseif($type === 'button')
|
||||
<button {{ $attributes }} @if ($disabled !== null) disabled @endif type="button"
|
||||
wire:target="{{ explode('(', $attributes->whereStartsWith('wire:click')->first())[0] }}"
|
||||
wire:loading.delay.shorter.class="loading"
|
||||
@isset($confirm)
|
||||
x-on:click="toggleConfirmModal('{{ $confirm }}', '{{ explode('(', $confirmAction)[0] }}')"
|
||||
@endisset
|
||||
@isset($confirmAction)
|
||||
x-on:{{ explode('(', $confirmAction)[0] }}.window="$wire.{{ explode('(', $confirmAction)[0] }}"
|
||||
@endisset>
|
||||
{{ $slot }}
|
||||
</button>
|
||||
@endif
|
||||
|
||||
@@ -8,17 +8,16 @@
|
||||
'noDirty' => $attributes->has('noDirty'),
|
||||
'disabled' => null,
|
||||
])
|
||||
|
||||
<label {{ $attributes->merge(['class' => 'flex items-center gap-16 cursor-pointer']) }}>
|
||||
<span class="label-text">
|
||||
<label {{ $attributes->merge(['class' => 'flex cursor-pointer w-64 label']) }}>
|
||||
<div class="label-text">
|
||||
@if ($label)
|
||||
{{ $label }}
|
||||
@else
|
||||
{{ $id }}
|
||||
@endif
|
||||
</span>
|
||||
<input type="checkbox" @if ($disabled !== null) disabled @endif class="toggle" name={{ $id }}
|
||||
</div>
|
||||
<div class="flex-1"></div>
|
||||
<input type="checkbox" @if ($disabled !== null) disabled @endif name={{ $id }}
|
||||
@if (!$noDirty) wire:dirty.class="input-warning" @endif
|
||||
@if ($instantSave) wire:click='instantSave' wire:model.defer={{ $id }} @else wire:model.defer={{ $value ?? $id }} @endif />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
@props([
|
||||
'id' => $attributes->has('id') || $attributes->has('label'),
|
||||
'required' => $attributes->has('required'),
|
||||
'type' => $attributes->get('type') ?? 'text',
|
||||
'required' => null,
|
||||
'label' => $attributes->has('label'),
|
||||
'helper' => $attributes->has('helper'),
|
||||
'instantSave' => $attributes->has('instantSave'),
|
||||
'noLabel' => $attributes->has('noLabel'),
|
||||
'noDirty' => $attributes->has('noDirty'),
|
||||
'disabled' => null,
|
||||
])
|
||||
|
||||
<div class="w-full max-w-xs form-control">
|
||||
<div {{ $attributes->merge(['class' => 'w-full form-control']) }}>
|
||||
@if (!$noLabel)
|
||||
<label class="label">
|
||||
<span class="label-text">
|
||||
@@ -40,8 +41,8 @@
|
||||
</span>
|
||||
</label>
|
||||
@endif
|
||||
<input {{ $attributes }} name={{ $id }}
|
||||
@if ($instantSave) wire:click='instantSave' wire:model.defer={{ $id }} @else wire:model.defer={{ $value ?? $id }} @endif
|
||||
<input {{ $attributes }} type={{ $type }} name={{ $id }} wire:model.defer={{ $id }}
|
||||
@if ($disabled !== null) disabled @endif @if ($required !== null) required @endif
|
||||
@if (!$noDirty) wire:dirty.class="input-warning" @endif />
|
||||
@error($id)
|
||||
<label class="label">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
'required' => false,
|
||||
])
|
||||
|
||||
<span @class(['flex flex-col'])>
|
||||
<span {{ $attributes->merge(['class' => 'flex flex-col']) }}>
|
||||
<label for={{ $id }}>
|
||||
@if ($label)
|
||||
{{ $label }}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
'noDirty' => $attributes->has('noDirty'),
|
||||
])
|
||||
|
||||
<div class="w-full max-w-xs form-control">
|
||||
<div class=" form-control">
|
||||
@if (!$noLabel)
|
||||
<label class="label">
|
||||
<span class="label-text">
|
||||
@@ -40,8 +40,7 @@
|
||||
</span>
|
||||
</label>
|
||||
@endif
|
||||
<textarea {{ $attributes }} name={{ $id }}
|
||||
@if ($instantSave) wire:click='instantSave' wire:model.defer={{ $id }} @else wire:model.defer={{ $value ?? $id }} @endif
|
||||
<textarea {{ $attributes }} name={{ $id }} wire:model.defer={{ $value ?? $id }}
|
||||
@if (!$noDirty) wire:dirty.class="input-warning" @endif></textarea>
|
||||
@error($id)
|
||||
<label class="label">
|
||||
|
||||
Reference in New Issue
Block a user