diff --git a/src/Screen/Cell.php b/src/Screen/Cell.php index 5fa4e9a57..d21ba1fb4 100644 --- a/src/Screen/Cell.php +++ b/src/Screen/Cell.php @@ -121,9 +121,10 @@ protected function renderComponent(string $component, $value, array $params = [] * * @param string $component The component to render. * @param mixed ...$params Optional parameters for the component. + * * @return $this */ - public function component(string $component, ...$params): static + public function component(string $component, ...$params): static { /** Backward compatibility workaround. * @@ -167,7 +168,6 @@ public function usingComponent(string $component, ...$params): static return $this->asComponent($component, $params); } - /** * @param Repository|Model $source * diff --git a/src/Screen/Components/Cells/Text.php b/src/Screen/Components/Cells/Text.php index 7f4801a89..1f87f67a2 100644 --- a/src/Screen/Components/Cells/Text.php +++ b/src/Screen/Components/Cells/Text.php @@ -19,7 +19,7 @@ class Text extends Component */ public function __construct( protected mixed $value, - protected ?string $title = null, + protected ?string $title = null, protected ?string $description = null, protected ?int $words = 30, protected ?int $clamp = 5, @@ -36,8 +36,8 @@ public function render() return Blade::render('
@empty(!$title){{ $title }}@endempty {{ $description }}
', [ - 'class' => $this->clamp ? 'line-clamp-'.$this->clamp : '', - 'title' => $this->title ? Str::of($this->value->getContent($this->title))->words($this->words) : '', + 'class' => $this->clamp ? 'line-clamp-'.$this->clamp : '', + 'title' => $this->title ? Str::of($this->value->getContent($this->title))->words($this->words) : '', 'description' => Str::of($this->value->getContent($this->description))->words($this->words), ]); }