first commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
@props(['href' => null, 'disabled' => false])
|
||||
|
||||
@php
|
||||
$classes = 'inline-flex cursor-pointer items-center gap-2 rounded-md bg-primary-600 px-4 py-2 font-medium'
|
||||
.' text-white transition-colors hover:bg-primary-700 focus-visible:outline-2'
|
||||
.' focus-visible:outline-offset-2 focus-visible:outline-primary-600'
|
||||
.' disabled:pointer-events-none disabled:opacity-60';
|
||||
@endphp
|
||||
|
||||
@if ($href && ! $disabled)
|
||||
<a href="{{ $href }}" {{ $attributes->merge(['class' => $classes]) }}>{{ $slot }}</a>
|
||||
@else
|
||||
<button {{ $attributes->merge(['class' => $classes]) }} @disabled($disabled)>{{ $slot }}</button>
|
||||
@endif
|
||||
@@ -0,0 +1,7 @@
|
||||
@props(['title'])
|
||||
|
||||
<div class="rounded-lg border border-slate-200 bg-white p-6 shadow-sm">
|
||||
<h3 class="mb-4 border-b border-slate-100 pb-4 text-xl font-medium text-slate-800">{{ $title }}</h3>
|
||||
|
||||
{{ $slot }}
|
||||
</div>
|
||||
@@ -0,0 +1,23 @@
|
||||
@props(['name', 'label', 'type' => 'text', 'hint' => null, 'value' => ''])
|
||||
|
||||
<div>
|
||||
<label for="{{ $name }}" class="mb-1 block text-slate-700">{{ $label }}</label>
|
||||
|
||||
<input
|
||||
type="{{ $type }}"
|
||||
id="{{ $name }}"
|
||||
name="{{ $name }}"
|
||||
{{-- Passwords are never echoed back into the form. --}}
|
||||
value="{{ $type === 'password' ? '' : old($name, $value) }}"
|
||||
@class([
|
||||
'bg-field block w-full rounded-md border px-3 py-2 text-slate-700 shadow-xs',
|
||||
'transition-colors focus:outline-none focus:ring-2',
|
||||
'border-red-500 focus:border-red-500 focus:ring-red-100' => $errors->has($name),
|
||||
'border-slate-300 focus:border-primary-500 focus:ring-primary-100' => ! $errors->has($name),
|
||||
])
|
||||
>
|
||||
|
||||
<small @class(['mt-1 block', 'text-red-600' => $errors->has($name), 'text-slate-500' => ! $errors->has($name)])>
|
||||
{{ $errors->first($name) ?: $hint }}
|
||||
</small>
|
||||
</div>
|
||||
@@ -0,0 +1,4 @@
|
||||
<img src="{{ $src ?? '' }}"
|
||||
class="{{ $class ?? '' }}"
|
||||
alt="{{ setting('app_name') }}"
|
||||
height="{{ $height ?? '50' }}">
|
||||
Reference in New Issue
Block a user