yassinedoghri/tempest-icons 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

yassinedoghri/tempest-icons

Composer 安装命令:

composer require yassinedoghri/tempest-icons

包简介

A Tempest library providing a convenient `icon(…)` function for rendering SVG icons with php-icons.

README 文档

README

Tempest Icons 🌊 🙂

A Tempest library providing a convenient icon(…) function for rendering SVG icons with php-icons.

Latest Stable Version Total Downloads License PHP Version Require

🚀 Getting started

0. Prerequisites

Usage of Tempest Icons requires the following:

  • A Tempest based project
  • Composer for package management
  • PHP 8.3+

1. Install via composer

composer require yassinedoghri/tempest-icons

2. Setup

Initialize and configure PHPIcons, ie. create the php-icons.php config file:

vendor/bin/php-icons init

3. Usage

Use the icon(string $iconKey, array $attributes) function anywhere in your View files to render SVG icons:

<?= icon('material-symbols:bolt') ?>
// <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
//      <path fill="currentColor" d="m8 22l1-7H4l9-13h2l-1 8h6L10 22z"/>
// </svg>

<?= icon('material-symbols:bolt', ['class' => 'text-2xl', "style" => "color: yellow;"]) ?>
// <svg class="text-2xl" style="color: yellow;" [...]>...</svg>

<?= icon('material-symbols:bolt')
        ->attr('class', 'text-2xl')
        ->attr('style', 'color: yellow;') ?>
// <svg class="text-2xl" style="color: yellow;" [...]>...</svg>

For more usage info, see php icons docs.

📜 License

Code released under the MIT License.

Copyright (c) 2024-present, Yassine Doghri (@yassinedoghri).

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-10-19