ichinya/moonshine-fontawesome-component 问题修复 & 功能扩展

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

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

ichinya/moonshine-fontawesome-component

最新稳定版本:1.4.0

Composer 安装命令:

composer require ichinya/moonshine-fontawesome-component

包简介

Font Awesome icons selection component for MoonShine

README 文档

README

PHP

Requirements

  • MoonShine v4.0+
MoonShine FontAwesomeIcon Comment
2.0+ 1.0
3.0+ 1.1+ Color::Blue
4.0+ 1.4+ Color::BLUE

Installation

composer require ichinya/moonshine-fontawesome-component

Usage

Example of usage:

  • FontAwesome::make('<i class="fa-brands fa-telegram"></i>' , 'blue')
  • FontAwesome::make('fa-brands fa-telegram' , \MoonShine\Support\Enums\Color::BLUE)

For out:

    echo FontAwesome::make('fa-brands fa-telegram')->toString();
    echo FontAwesome::make('fa-brands fa-telegram' , \MoonShine\Support\Enums\Color::BLUE)->render();
    echo (string) FontAwesome::make('fa-brands fa-telegram' , \MoonShine\Support\Enums\Color::BLUE);

You can use FontAwesome component in your resources:

class CustomResource extends ModelResource
{
    public function fields(): array
    {
        return [
             Select::make('Тип', 'type')->options([
//                    TelegramBot::class => FontAwesome::make('<i class="fa-brands fa-telegram"></i>' , 'blue'),
                    TelegramBot::class =>  Badge::make(FontAwesome::make('<i class="fa-brands fa-telegram"></i>' , 'blue') . 'Telegram', 'blue'),

                ]),
        ];
    }
}

Use in Menu:

use Ichinya\FontAwesome\Components\MenuItem;

protected function menu(): array
    {
        return [
            MenuItem::make('Файлы', FileResource::class)->fontAwesomeIcon('<i class="fa-solid fa-upload"></i>'),
        ];
    }

Plans

  • Macros to Fields.
  • fa-brands fa-telegram => telegram
  • Add more customization options for the FontAwesome Component.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-12-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固