eduard9969 / blade-polaris-icons
一个用于在Laravel Blade视图中轻松使用Polaris Icons的包。
2.7.0
2024-07-24 08:19 UTC
Requires
- php: ^7.4|^8.0|^8.1|^8.2|^8.3
- blade-ui-kit/blade-icons: ^1.1
- illuminate/support: ^8.0|^9.0|^10.0|^11.0
Requires (Dev)
- codeat3/blade-icon-generation-helpers: ^0.8
- codeat3/phpcs-styles: ^1.0
- orchestra/testbench: ^6.0|^7.0|^8.0|^9.0
- phpunit/phpunit: ^9.0|^10.0
- dev-main
- 2.7.0
- 2.6.1
- 2.6.0
- 2.5.0
- 2.4.1
- 2.4.0
- 2.3.0
- 2.2.0
- 2.1.1
- 2.1.0
- 2.0.0
- 1.5.1
- 1.5.0
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.9
- 1.3.8
- 1.3.7
- 1.3.6
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.1
- 1.0.0
- dev-feature/update-5bb85b547ea0fa7b8cdc07c1fe68966b48cc2cdf
- dev-feature/update-e7cb7a609f1186f9c2158271aeeea80849cfa310
This package is auto-updated.
Last update: 2024-09-23 13:08:03 UTC
README
一个用于在Laravel Blade视图中轻松使用Polaris Icons的包。
要查看所有可用的图标,请参阅SVG 目录,或在 shopify.com 上预览。Polaris Icons最初由Shopify 团队开发。
需求
- PHP 7.4 或更高版本
- Laravel 8.0 或更高版本
安装
composer require eduard9969/blade-polaris-icons
更新
在更新库时,请参阅更新指南
。
Blade Icons
Blade Polaris Icons 在底层使用 Blade Icons。有关其他功能,请参阅Blade Icons 的说明。我们还建议使用此库启用图标缓存。
配置
Blade Polaris Icons 还提供了使用Blade Icons功能的能力,如默认类、默认属性等。如果您想配置这些,请发布 blade-polaris-icons.php
配置文件
php artisan vendor:publish --tag=blade-polaris-icons-config
用法
图标名称结构
{icon-name}-icon.svg
图标可以作为自闭合的Blade组件使用,它们将被编译成SVG图标
<x-polaris-cart-abandoned-icon/>
您还可以向图标组件传递类
<x-polaris-cart-abandoned-icon class="w-6 h-6 text-gray-500"/>
甚至可以使用内联样式
<x-polaris-cart-abandoned-icon style="color: #555"/>
原始SVG图标
如果您想将原始SVG图标用作资产,您可以使用以下方式发布它们
php artisan vendor:publish --tag=blade-polaris-icons --force
然后可以在视图中使用它们,如下所示
<img src="{{ asset('vendor/blade-polaris-icons/cart-abandoned-icon.svg') }}" width="10" height="10"/>
变更日志
请查看此存储库中的变更日志,了解所有最近的变化。
维护者
Blade Polaris Icons由Eduard Samoilenko开发和维护。
许可
Blade Polaris Icons是开源软件,根据MIT 许可授权。