ccsliinc/livewire-toast
最新稳定版本:v0.1
Composer 安装命令:
composer require ccsliinc/livewire-toast
包简介
An Alpine.js toast package for laravel livewire.
README 文档
README
This is a livewire toast package for laravel.
Installation
You can install the package via composer:
composer require ccsliinc/livewire-toast
You can publish the config file with:
php artisan vendor:publish --tag="livewire-toast-config"
This is the contents of the published config file:
return [ /** * Default delay in ms for automatic close; */ 'delay' => '5000', /** * Position of toast. * * 'top-left' * 'top-center' * 'top-right' * 'middle-left' * 'middle-center' * 'middle-right' * 'bottom-left' * 'bottom-center' * 'bottom-right' */ 'position' => 'bottom-right', /** * Percentage */ 'opacity' => 85, ];
Optionally, you can publish the views using
php artisan vendor:publish --tag="livewire-toast-views"
Usage
1. Add @include('livewire-toast::notification') in your template. 2. On any livewire component call: $this->notify('Message', 'Title', 'Second Title', 'type');
Arguments
- Message - The message to display.
- Title - The title of the toast.
- Secondary Title - Small text after the title.
- Toast Type - Options : success, info, error, warning
Testing
composer test
Roadmap
- Create proper component transitions (in/out)
- Support multiple css frameworks
- Do Dusk testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 24
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-03-02