diff --git a/resources/views/actions/button.blade.php b/resources/views/actions/button.blade.php index 727cdff0..f9e65631 100644 --- a/resources/views/actions/button.blade.php +++ b/resources/views/actions/button.blade.php @@ -2,7 +2,7 @@ ->cssClass([ 'layer' => 'flex shrink-0 cursor-pointer items-center justify-center', 'label' => 'text-inherit', - 'primary' => 'py-1.5 px-3 bg-primary-500 rounded border border-primary-500', + 'primary' => 'py-1.5 px-3 gap-1 bg-primary-500 rounded border border-primary-500', 'active' => 'text-primary-400 hover:text-primary-300', 'inactive' => 'text-secondary-400 hover:text-primary-400', 'icon' => 'size-6 text-secondary-400', diff --git a/resources/views/actions/link.blade.php b/resources/views/actions/link.blade.php index 4915e24a..e6f60453 100644 --- a/resources/views/actions/link.blade.php +++ b/resources/views/actions/link.blade.php @@ -2,6 +2,7 @@ ->cssClass([ 'layer' => 'inline-flex shrink-0 cursor-pointer items-center justify-center', 'label' => 'text-inherit', + 'button' => 'py-1.5 px-3 gap-1 border border-primary-500 no-underline', 'active' => 'text-primary-400 hover:text-primary-300', 'inactive' => 'text-secondary-400 hover:text-primary-400', 'icon' => 'size-6 text-secondary-400', @@ -9,6 +10,7 @@ ->mergeAttributes($action->getComponentAttributes()) ->classMerge([ 'layer', + 'button' => $isButton(), 'active' => $isCurrent(), 'inactive' => ! $isCurrent(), ]) diff --git a/src/Actions/Components/Link.php b/src/Actions/Components/Link.php index 212cbe0e..7cb7f892 100644 --- a/src/Actions/Components/Link.php +++ b/src/Actions/Components/Link.php @@ -12,6 +12,7 @@ class Link extends Component public function __construct( public Action $action, public ?string $active = null, + public ?bool $button = null, ) {} public function render(): View|Closure|string @@ -46,4 +47,9 @@ public function isCurrent(): bool return $this->action->routeIs() || $this->action->fullUrlIs(); } + + public function isButton(): bool + { + return boolval($this->button); + } }