-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(radio) estiliza o componente e cria o agrupamento
- Loading branch information
1 parent
e12496b
commit 0e12588
Showing
4 changed files
with
85 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
namespace Agenciafmd\Ui\View\Components\Forms; | ||
|
||
use Illuminate\Contracts\View\View; | ||
use Illuminate\View\Component; | ||
|
||
class Group extends Component | ||
{ | ||
public function __construct( | ||
public string $name = '', | ||
public string $label = '', | ||
public string $hint = '', | ||
) { | ||
} | ||
|
||
public function render(): string|View | ||
{ | ||
return <<<'HTML' | ||
@if($label) | ||
<x-form.label for="{{ $name }}" @class(['required' => $attributes->has('required')])> | ||
{{ str($label)->lower()->ucfirst() }} | ||
</x-form.label> | ||
@endif | ||
{{ $slot }} | ||
<x-form.error field="{{ $name }}"/> | ||
<x-form.hint message="{{ $hint }}"/> | ||
HTML; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters