Skip to content

Commit

Permalink
feat(pint) commit pint linting
Browse files Browse the repository at this point in the history
  • Loading branch information
irineujunior authored and github-actions[bot] committed Mar 26, 2024
1 parent 2be8336 commit 7df56fb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
23 changes: 11 additions & 12 deletions src/View/Components/Forms/Inputs/Toggle.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,17 @@ public function __construct(

public function render(): string|View
{
// $classCollection = Str::of($attributes->get('class'))->explode(' ');
// $labelClass = $classCollection->filter(function (string $value, string $key) {
// return Str::of($value)->startsWith('form-switch');
// })->values();
// $inputClass = $classCollection->filter(function (string $value, string $key) {
// return !Str::of($value)->startsWith('form-switch');
// })->values();
// <label class="form-check form-switch">
// <input class="form-check-input" type="checkbox" checked="">
// <span class="form-check-label">Option 1</span>
// </label>

// $classCollection = Str::of($attributes->get('class'))->explode(' ');
// $labelClass = $classCollection->filter(function (string $value, string $key) {
// return Str::of($value)->startsWith('form-switch');
// })->values();
// $inputClass = $classCollection->filter(function (string $value, string $key) {
// return !Str::of($value)->startsWith('form-switch');
// })->values();
// <label class="form-check form-switch">
// <input class="form-check-input" type="checkbox" checked="">
// <span class="form-check-label">Option 1</span>
// </label>

return <<<'HTML'
<label @class([
Expand Down
9 changes: 4 additions & 5 deletions src/View/Components/Forms/Inputs/__Toggle.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ public function __construct(
public string $hint = '',
public string $inline = '',
public array $values = [],
)
{
) {
$this->uuid = '-' . str(serialize($this))
->pipe('md5')
->limit(5, '')
->toString();
->pipe('md5')
->limit(5, '')
->toString();
}

public function render(): string|View
Expand Down

0 comments on commit 7df56fb

Please sign in to comment.