section classname modified

This commit is contained in:
Burak Civan 2022-08-03 10:38:33 +03:00
parent 7a06e90d2f
commit 5fca2098a4
4 changed files with 63 additions and 16 deletions

View File

@ -0,0 +1,38 @@
<?php
namespace App\View\Components\Form;
use App\Abstracts\View\Component;
use Illuminate\Support\Str;
class Section extends Component
{
public $spacingVertical;
public $spacingHorizontal;
public $columnNumber;
/**
* Create a new component instance.
*
* @return void
*/
public function __construct(
string $spacingVertical = 'gap-x-8', string $spacingHorizontal = 'gap-y-6', string $columnNumber = 'sm:grid-cols-6',
) {
$this->spacingVertical = $spacingVertical;
$this->spacingHorizontal = $spacingHorizontal;
$columnNumber = $columnNumber;
}
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.section.index');
}
}

8
public/css/app.css vendored
View File

@ -48389,6 +48389,10 @@ body{
width: 25%; width: 25%;
} }
.lg\:w-2\/12{
width: 16.666667%;
}
.lg\:w-80{ .lg\:w-80{
width: 20rem; width: 20rem;
} }
@ -48409,10 +48413,6 @@ body{
width: 60%; width: 60%;
} }
.lg\:w-2\/12{
width: 16.666667%;
}
.lg\:w-7\/12{ .lg\:w-7\/12{
width: 58.333333%; width: 58.333333%;
} }

View File

@ -4,9 +4,16 @@
@endif @endif
@if (! empty($body) && $body->isNotEmpty()) @if (! empty($body) && $body->isNotEmpty())
<div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 my-3.5"> <div
{!! $body !!} @class([
</div> 'grid my-3.5',
$spacingVertical,
$spacingHorizontal,
$columnNumber,
])
>
{!! $body !!}
</div>
@endif @endif
@if (! empty($foot) && $foot->isNotEmpty()) @if (! empty($foot) && $foot->isNotEmpty())

View File

@ -5,19 +5,21 @@
<x-slot name="content"> <x-slot name="content">
<x-form id="form-app" route="apps.api-key.store"> <x-form id="form-app" route="apps.api-key.store">
<div class="w-1/2"> <x-form.section spacing-horizontal="gap-y-2">
<div class="py-8 flex flex-col gap-2"> <x-slot name="body">
<x-form.group.text name="api_key" placeholder="{{ trans('general.form.enter', ['field' => trans('modules.api_key')]) }}" value="{{ setting('apps.api_key', null) }}" /> <x-form.group.text name="api_key" placeholder="{{ trans('general.form.enter', ['field' => trans('modules.api_key')]) }}" value="{{ setting('apps.api_key', null) }}" />
<div class="text-xs"> <div class="sm:col-span-6">
{!! trans('modules.get_api_key', ['url' => 'https://akaunting.com/dashboard']) !!} <div class="text-xs">
{!! trans('modules.get_api_key', ['url' => 'https://akaunting.com/dashboard']) !!}
</div>
</div> </div>
</div>
<div> <div class="sm:col-span-3">
<x-form.buttons cancel-route="apps.home.index" without-cancel /> <x-form.buttons cancel-route="apps.home.index" without-cancel />
</div> </div>
</div> </x-slot>
</x-form.section>
</x-form> </x-form>
</x-slot> </x-slot>