Skip to content

Commit

Permalink
fix: minor for modals,off-canvases
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-to committed Dec 21, 2023
1 parent d1e8af1 commit d61d248
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/UI/Modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ public function title(mixed $data = null): ?string

public function content(mixed $data = null): ?string
{
return value($this->content, $data);
$content = value($this->content, $data);

return !is_null($content)
? (string) $content
: null;
}

public function buttons(array $buttons): self
Expand Down
6 changes: 5 additions & 1 deletion src/UI/OffCanvas.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ public function title(mixed $data = null): ?string

public function content(mixed $data = null): ?string
{
return value($this->content, $data);
$content = value($this->content, $data);

return !is_null($content)
? (string) $content
: null;
}
}

0 comments on commit d61d248

Please sign in to comment.