anodyne / blade-fluentui-icons
一个易于在 Laravel Blade 视图中使用 Heroicons 的包。
1.1.259
2024-09-29 01:30 UTC
Requires
- php: ^8.1
- blade-ui-kit/blade-icons: ^1.5
- illuminate/support: ^9.0|^10.0|^11.0
Requires (Dev)
- laravel/pint: ^1.15
- microsoft/fluentui-system-icons: 1.1.259
- orchestra/testbench: ^7.0|^8.0|^9.0
- phpunit/phpunit: ^9.5|^10.0|^11.0
This package is auto-updated.
Last update: 2024-09-29 01:31:53 UTC
README
一个易于在 Laravel Blade 视图中使用 Fluent UI 图标 的包。
要查看所有可用图标,请参阅 SVG 目录。
要求
- PHP 8.1 或更高版本
- Laravel 9.0 或更高版本
安装
composer require anodyne/blade-fluentui-icons
Blade 图标
Blade FluentUI 图标在底层使用 Blade 图标。有关其他功能,请参阅 Blade Icons 读取文件。我们还建议使用此库 启用图标缓存。
配置
Blade FluentUI 图标还提供了使用 Blade 图标功能(如默认类、默认属性等)的能力。如果您想配置这些,请发布 blade-fluentui-icons.php
配置文件
php artisan vendor:publish --tag=blade-fluentui-icons-config
用法
图标可以作为自闭合的 Blade 组件使用,它们将被编译成 SVG 图标
<x-fluentui-o-access-time/>
您也可以向图标组件传递类
<x-fluentui-o-access-time class="w-6 h-6 text-gray-500"/>
甚至可以使用内联样式
<x-fluentui-o-access-time style="color: #555"/>
实心图标可以像这样引用
<x-fluentui-f-access-time/>
原始 SVG 图标
如果您想将原始 SVG 图标作为资源使用,可以使用以下命令发布它们
php artisan vendor:publish --tag=blade-fluentui-icons --force
然后您可以在视图中像这样使用它们
<img src="{{ asset('vendor/blade-fluentui-icons/f-access-time.svg') }}" width="10" height="10"/> <img src="{{ asset('vendor/blade-fluentui-icons/o-access-time.svg') }}" width="10" height="10"/>
变更日志
请参阅此存储库中的 变更日志 了解所有最近更改。
维护者
Blade FluentUI 图标由 Anodyne Productions 开发和维护。
许可证
Blade FluentUI 图标是开源软件,根据 MIT 许可证 许可。