Skip to content

Commit

Permalink
## 14.22.0 - 2024-04-14
Browse files Browse the repository at this point in the history
  • Loading branch information
tabuna committed Apr 14, 2024
1 parent b6adddc commit b966397
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## 14.22.0 - 2024-04-14

### Added
- `Text` component for `Cell`

### Changed
- Popover trigger to hover/active
- Improved component rendering method with backward compatibility

### Fixed
- Trim profile name/description

## 14.21.1 - 2024-03-25

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion src/Platform/Dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Dashboard
/**
* ORCHID Version.
*/
public const VERSION = '14.21.1';
public const VERSION = '14.22.0';

/**
* @deprecated
Expand Down
14 changes: 7 additions & 7 deletions src/Screen/Components/Cells/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ class Text extends Component
*
* @param mixed $value
* @param string|null $title
* @param string|null $description
* @param string|null $text
* @param int|null $words
* @param int|null $clamp
*/
public function __construct(
protected mixed $value,
protected ?string $title = null,
protected ?string $description = null,
protected ?string $title = null,
protected ?string $text = null,
protected ?int $words = 30,
protected ?int $clamp = 5,
) {
Expand All @@ -35,10 +35,10 @@ public function render()
{
return Blade::render('<div class="text-balance line-clamp {{ $class }}">
@empty(!$title)<strong class="d-block">{{ $title }}</strong>@endempty
<span class="text-muted">{{ $description }}</span></div>', [
'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),
<span class="text-muted">{{ $text }}</span></div>', [
'class' => $this->clamp ? 'line-clamp-' . $this->clamp : '',
'title' => $this->title ? Str::of($this->value->getContent($this->title))->words($this->words) : '',
'text' => Str::of($this->value->getContent($this->text))->words($this->words),
]);
}
}

0 comments on commit b966397

Please sign in to comment.