<div>
<Thumbnail blog="$blog" />
<a href="{$blog->url}">
<h3>{$blog->title}</h3>
<p>{$blog->description}</p>
</a>
<LikeButton liked="{$blog->favorite}" (click)="like" />
</div>
class Blog extends BaseComponent
{
public BlogModel $blog;
public function like(bool $liked)
{
$this->blog->favorite = !$this->blog->favorite;
}
}
Discover more at https://viewi.net.
All tests:
php vendor/bin/codecept run
Unit tests:
php vendor/bin/codecept run Unit
Specific test:
php vendor/bin/codecept run Unit JsTranspilerTest
php vendor/bin/codecept generate:test Unit JsTranspiler
We all have full-time jobs and dedicate our free time to this project, and we would appreciate Your help of any kind. If you like what we are creating here and want us to spend more time on this, please consider supporting:
- Give us a star⭐.
- Support me on buymeacoffee
- Follow us on Twitter.
- Contribute by sending pull requests.
- Any other ideas or proposals? Please mail me contact@viewi.net.
- Feel welcome to share this project with your friends.
Copyright (c) 2020-present Ivan Voitovych
Please see MIT for license text