承接 ichinya/moonshine-fontawesome-component 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱: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.

统计信息

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

GitHub 信息

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

其他信息

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