naykel / iconit
NAYKEL Laravel 应用程序的图标组件
v0.1.6
2022-12-06 04:44 UTC
Requires
- php: >=8.0
README
Iconit
https://naykel.site/docs/iconit/introduction
此仅为指南,可能无法完美运行!
添加新图标
为了保持一致性
- 图标应保存为20像素高
- 图标不应有任何填充颜色
步骤 1. 在 resources/views/components
中保存 SVG 文件。
步骤 2. 将扩展名从 svg
更改为 blade.php
您可以在 resources/views/components
目录中运行以下命令来批量更新文件扩展名。
for i in *.svg; do mv -- "$i" "${i%.svg}.blade.php"; done
步骤 3. 删除填充颜色
使用编辑器的查找和替换功能,删除填充颜色以允许默认样式工作。
步骤 4. 添加 $attributes
搜索
<svg xmlns="http://www.w3.org/2000/svg"
替换为
<svg {{ $attributes }} xmlns="http://www.w3.org/2000/svg"