happytodev / filament-tailwind-color-picker
Filamentphp 专用的特定 Tailwindcss 颜色选择器
v0.1.9
2022-11-17 09:04 UTC
Requires
- php: ^8.1
- illuminate/contracts: ^9.0
- spatie/laravel-package-tools: ^1.9.2
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^6.0
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^7.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.5
- dev-main
- v0.1.9
- v0.1.8
- v0.1.7
- v0.1.6
- v0.1.5
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
- dev-dependabot/github_actions/stefanzweifel/git-auto-commit-action-5
- dev-dependabot/github_actions/actions/checkout-4
- dev-dependabot/github_actions/aglipanci/laravel-pint-action-2.3.0
- dev-dependabot/github_actions/ramsey/composer-install-2
- dev-develop
This package is auto-updated.
Last update: 2024-09-09 13:02:22 UTC
README
此插件在 Filament 表单中添加一个字段,帮助您选择 Tailwind 颜色调板中的颜色。
屏幕截图
单个 Tailwind 颜色选择器在 Filament 中
代码集成示例
Filament Tailwind 颜色选择器与 Filament 其他字段完美配合
在 1280x1024 上响应式
在 iPhone 12 Pro 上响应式
支持我们
安装
首先您需要一个正常工作的 Filament 安装。为此,请阅读 Filament 网站的说明。
您可以通过 composer 安装此包
composer require happytodev/filament-tailwind-color-picker
可选地,您可以使用以下方法发布视图
php artisan vendor:publish --tag="filament-tailwind-color-picker-views"
用法
添加背景颜色选择器
TailwindColorPicker::make('backgroundColor') ->bgScope(),
当用户在 tailwindcss 调板中选择颜色时,表单返回的值将是例如
bg-red-300
添加文本颜色选择器
TailwindColorPicker::make('backgroundColor') ->textScope(),
当用户在 tailwindcss 调板中选择颜色时,表单返回的值将是例如
text-red-300
测试
composer test
变更日志
请参阅 CHANGELOG 了解最近更改的详细信息。
贡献
请参阅 CONTRIBUTING 了解详细信息。
安全漏洞
请审查 我们的安全策略 了解如何报告安全漏洞。
致谢
许可证
MIT 许可证 (MIT)。请参阅 许可证文件 了解更多信息。