Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
lrljoe authored and github-actions[bot] committed Oct 1, 2024
1 parent 141f395 commit 24eaef9
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,4 @@ public function setLoadingPlaceholderContent(string $content): self

return $this;
}

}
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
<?php

namespace Rappasoft\LaravelLivewireTables\Traits\Styling\Configuration;

trait LoadingPlaceholderStylingConfiguration
{
public function setLoadingPlaceHolderAttributes(array $attributes): self
{
$this->loadingPlaceHolderAttributes = $attributes;

return $this;
}

public function setLoadingPlaceHolderIconAttributes(array $attributes): self
{
$this->loadingPlaceHolderIconAttributes = $attributes;

return $this;
}

public function setLoadingPlaceHolderWrapperAttributes(array $attributes): self
{
$this->loadingPlaceHolderWrapperAttributes = $attributes;

return $this;
}

public function setLoadingPlaceholderBlade(string $customBlade): self
{
$this->loadingPlaceholderBlade = $customBlade;

return $this;
}

}
<?php

namespace Rappasoft\LaravelLivewireTables\Traits\Styling\Configuration;

trait LoadingPlaceholderStylingConfiguration
{
public function setLoadingPlaceHolderAttributes(array $attributes): self
{
$this->loadingPlaceHolderAttributes = $attributes;

return $this;
}

public function setLoadingPlaceHolderIconAttributes(array $attributes): self
{
$this->loadingPlaceHolderIconAttributes = $attributes;

return $this;
}

public function setLoadingPlaceHolderWrapperAttributes(array $attributes): self
{
$this->loadingPlaceHolderWrapperAttributes = $attributes;

return $this;
}

public function setLoadingPlaceholderBlade(string $customBlade): self
{
$this->loadingPlaceholderBlade = $customBlade;

return $this;
}
}
41 changes: 20 additions & 21 deletions src/Traits/Styling/HasLoadingPlaceholderStyling.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
<?php

namespace Rappasoft\LaravelLivewireTables\Traits\Styling;

use Rappasoft\LaravelLivewireTables\Traits\Styling\Configuration\LoadingPlaceholderStylingConfiguration;
use Rappasoft\LaravelLivewireTables\Traits\Styling\Helpers\LoadingPlaceholderStylingHelpers;

trait HasLoadingPlaceholderStyling
{
use LoadingPlaceholderStylingConfiguration,
LoadingPlaceholderStylingHelpers;

protected array $loadingPlaceHolderAttributes = [];

protected array $loadingPlaceHolderIconAttributes = [];

protected array $loadingPlaceHolderWrapperAttributes = [];

protected array $loadingPlaceHolderCellAttributes = ['class' => '', 'default' => true];

}
<?php

namespace Rappasoft\LaravelLivewireTables\Traits\Styling;

use Rappasoft\LaravelLivewireTables\Traits\Styling\Configuration\LoadingPlaceholderStylingConfiguration;
use Rappasoft\LaravelLivewireTables\Traits\Styling\Helpers\LoadingPlaceholderStylingHelpers;

trait HasLoadingPlaceholderStyling
{
use LoadingPlaceholderStylingConfiguration,
LoadingPlaceholderStylingHelpers;

protected array $loadingPlaceHolderAttributes = [];

protected array $loadingPlaceHolderIconAttributes = [];

protected array $loadingPlaceHolderWrapperAttributes = [];

protected array $loadingPlaceHolderCellAttributes = ['class' => '', 'default' => true];
}
56 changes: 28 additions & 28 deletions src/Traits/Styling/Helpers/LoadingPlaceholderStylingHelpers.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
<?php

namespace Rappasoft\LaravelLivewireTables\Traits\Styling\Helpers;

use Livewire\Attributes\Computed;

trait LoadingPlaceholderStylingHelpers
{
public function getLoadingPlaceholderAttributes(): array
{
return count($this->loadingPlaceHolderAttributes) ? $this->loadingPlaceHolderAttributes : ['default' => true];
}

public function getLoadingPlaceHolderIconAttributes(): array
{
return count($this->loadingPlaceHolderIconAttributes) ? $this->loadingPlaceHolderIconAttributes : ['default' => true];
}

public function getLoadingPlaceHolderWrapperAttributes(): array
{
return count($this->loadingPlaceHolderWrapperAttributes) ? $this->loadingPlaceHolderWrapperAttributes : ['default' => true];
}

public function getLoadingPlaceHolderCellAttributes(): array
{
return count($this->loadingPlaceHolderCellAttributes) ? $this->loadingPlaceHolderCellAttributes : ['default' => true];
}
}
<?php

namespace Rappasoft\LaravelLivewireTables\Traits\Styling\Helpers;

use Livewire\Attributes\Computed;

trait LoadingPlaceholderStylingHelpers
{
public function getLoadingPlaceholderAttributes(): array
{
return count($this->loadingPlaceHolderAttributes) ? $this->loadingPlaceHolderAttributes : ['default' => true];
}

public function getLoadingPlaceHolderIconAttributes(): array
{
return count($this->loadingPlaceHolderIconAttributes) ? $this->loadingPlaceHolderIconAttributes : ['default' => true];
}

public function getLoadingPlaceHolderWrapperAttributes(): array
{
return count($this->loadingPlaceHolderWrapperAttributes) ? $this->loadingPlaceHolderWrapperAttributes : ['default' => true];
}

public function getLoadingPlaceHolderCellAttributes(): array
{
return count($this->loadingPlaceHolderCellAttributes) ? $this->loadingPlaceHolderCellAttributes : ['default' => true];
}
}
2 changes: 0 additions & 2 deletions src/Traits/WithLoadingPlaceholder.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,4 @@ trait WithLoadingPlaceholder
protected string $loadingPlaceholderContent = 'Loading';

protected ?string $loadingPlaceholderBlade = null;


}

0 comments on commit 24eaef9

Please sign in to comment.