erikgaal / blade-streamline-icons
一个用于在Laravel Blade视图中轻松使用Streamline图标库的包。
v1.0.3
2024-08-12 08:49 UTC
Requires
- php: ^8.1
- blade-ui-kit/blade-icons: ^1.0
- firebase/php-jwt: ^5.0 | ^6.0
- illuminate/contracts: ^9.0 | ^10.0 | ^11.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^6.1
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.6
This package is auto-updated.
Last update: 2024-09-16 09:19:37 UTC
README
安装
您可以通过composer安装此包
composer require erikgaal/blade-streamline-icons
您可以使用以下命令发布配置文件
php artisan vendor:publish --tag="blade-streamline-icons-config"
这是发布配置文件的内容
return [ 'prefix' => 'streamline', 'path' => resource_path('icons/streamline'), /* * Define any aliases for families here. */ 'family_aliases' => [ 'core-line' => 'streamline-mini-line', 'core' => 'core-free', 'flex' => 'flex-free', 'plump' => 'plump-free', 'sharp' => 'sharp-free', ] ];
您必须使用以下方式登录Streamline API
php artisan streamline-icons:login
使用方法
使用以下方式从Streamline获取图标
php artisan streamline-icons:save core-line interface-home-1 # ▲ ▲ # │ └──── icon # └──── family # Alternatively, output in terminal. php artisan streamline-icons:get core-line interface-home-1
图标可以用作自闭合的Blade组件,这些组件将被编译为SVG图标
<x-streamline-core-line-interface-home-1/>
您还可以向图标组件传递类
<x-streamline-core-line-interface-home-1 class="w-6 h-6 text-gray-500"/>
甚至可以使用内联样式
<x-streamline-core-line-interface-home-1 style="color: #555"/>
或者使用@svg指令
@svg('streamline-core-line-interface-home-1', 'w-6 h-6', ['style' => 'color: #555'])
变更日志
有关最近更改的更多信息,请参阅变更日志
贡献
有关详细信息,请参阅贡献指南
安全漏洞
有关如何报告安全漏洞,请参阅我们的安全策略
鸣谢
许可
MIT许可(MIT)。有关更多信息,请参阅许可文件