-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
18 changed files
with
439 additions
and
309 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,29 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\View\Components\Election; | ||
|
||
use App\Models\Election; | ||
use Illuminate\Contracts\View\View; | ||
use Illuminate\View\Component; | ||
|
||
class Alert extends Component | ||
{ | ||
public ?string $alert = null; | ||
|
||
public function __construct(Election $election) | ||
{ | ||
$this->alert = data_get($election, 'properties.alert'); | ||
} | ||
|
||
public function shouldRender(): bool | ||
{ | ||
return filled($this->alert); | ||
} | ||
|
||
public function render(): View | ||
{ | ||
return view('components.election.alert'); | ||
} | ||
} |
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
Oops, something went wrong.