Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
marco76tv committed Dec 27, 2023
1 parent b1cb32f commit a913daa
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 1 deletion.
11 changes: 11 additions & 0 deletions Resources/views/components/bread-link/v1.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@props(['active'])

@php
$classes = ($active ?? false)
? 'mr-2 text-sm font-medium text-gray-700'
: 'mr-2 text-sm font-medium text-gray-500 hover:text-gray-600';
@endphp

<a {{ $attributes->merge(['class' => $classes]) }}>
{{ $slot }}
</a>
Empty file.
37 changes: 37 additions & 0 deletions View/Components/BreadLink.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

declare(strict_types=1);

namespace Modules\UI\View\Components;

use Illuminate\Contracts\Support\Renderable;
use Illuminate\View\Component;
use Modules\Blog\Models\Post;
use Modules\Xot\Actions\GetViewAction;

// use Modules\Xot\View\Components\XotBaseComponent;

/**
* .
*/
class BreadLink extends Component
{
public function __construct(
// public Post $article,
// public bool $showAuthor = false,
public string $tpl = 'v1')
{
}

public function render(): Renderable
{
/**
* @phpstan-var view-string
*/
$view = app(GetViewAction::class)->execute($this->tpl);

$view_params = [];

return view($view, $view_params);
}
}
37 changes: 37 additions & 0 deletions View/Components/Svg.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

declare(strict_types=1);

namespace Modules\UI\View\Components;

use Illuminate\Contracts\Support\Renderable;
use Illuminate\View\Component;
use Modules\Blog\Models\Post;
use Modules\Xot\Actions\GetViewAction;

// use Modules\Xot\View\Components\XotBaseComponent;

/**
* .
*/
class Svg extends Component
{
public function __construct(
// public Post $article,
// public bool $showAuthor = false,
public string $tpl = 'v1')
{
}

public function render(): Renderable
{
/**
* @phpstan-var view-string
*/
$view = app(GetViewAction::class)->execute($this->tpl);

$view_params = [];

return view($view, $view_params);
}
}
2 changes: 1 addition & 1 deletion View/Components/_components.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[]
[{"class_name":"BreadLink","comp_name":"bread-link","comp_ns":"Modules\\UI\\View\\Components\\BreadLink"},{"class_name":"Svg","comp_name":"svg","comp_ns":"Modules\\UI\\View\\Components\\Svg"}]

0 comments on commit a913daa

Please sign in to comment.