forrodominik / blade-sf-icons
一个用于在Laravel Blade视图中轻松使用StoreFront Icons的包。
v1.9
2022-06-20 10:24 UTC
Requires
- php: ^7.4|^8.0
- blade-ui-kit/blade-icons: ^1.1
- illuminate/support: ^8.0|^9.0
Requires (Dev)
- orchestra/testbench: ^6.0|^7.0
- phpunit/phpunit: ^9.0
README
一个用于在Laravel Blade视图中轻松使用StoreFront Icons的包。
可用图标
要求
- PHP 7.4 或更高版本
- Laravel 8.0 或更高版本
安装
composer require forrodominik/blade-sf-icons
配置
Blade StoreFront Icons 还提供了使用Blade Icons功能的能力,如默认类、默认属性等。如果您想配置这些,发布 blade-sf-icons.php
配置文件
php artisan vendor:publish --tag=blade-sf-icons-config
用法
图标可以作为自闭合的Blade组件使用,这些组件将被编译成SVG图标
<x-sficon-adjustments/>
您还可以向图标组件传递类
<x-sficon-adjustments class="w-6 h-6 text-gray-500"/>
甚至可以使用内联样式
<x-sficon-adjustments style="color: #555"/>
实心图标可以像这样引用
<x-sficon-s-adjustments/>