action = $action; return $this; } public function slot(string $slot): static { $this->slot = $slot; return $this; } private function makeAttributes(): ComponentAttributeBag { return $this->getAttributes()->merge([ 'wire:click' => $this->action, ]); } public function render(): View { return view( 'laralight-tables::toolbar.button', [ 'action' => $this->action, 'attributes' => $this->makeAttributes(), 'slot' => $this->slot, ] ); } }