-
-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
141f395
commit 24eaef9
Showing
5 changed files
with
82 additions
and
87 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,5 +31,4 @@ public function setLoadingPlaceholderContent(string $content): self | |
|
||
return $this; | ||
} | ||
|
||
} |
69 changes: 34 additions & 35 deletions
69
src/Traits/Styling/Configuration/LoadingPlaceholderStylingConfiguration.php
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 |
---|---|---|
@@ -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; | ||
} | ||
} |
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 |
---|---|---|
@@ -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
56
src/Traits/Styling/Helpers/LoadingPlaceholderStylingHelpers.php
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 |
---|---|---|
@@ -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]; | ||
} | ||
} |
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