Placeholder badge color not working
I have made a badge which color is based on the condition. My problem is the class color is not reflected EXCEPT for gray color. Yellow and green does not reflect. Although I checked it in browser dev view the class (e.g bg-yellow-100) is there but the actual style is not applied.
Solution:Jump to solution
You can try something like this if you want.
```php
Placeholder::make('Status')->content(function ($record) {
$color = match ($record->status) {...
4 Replies
/* pending /
.bg-yellow-c-100 {
background-color: rgb(254 249 195) !important;
}
.fill-yellow-c-400 {
background-color: rgb(250 204 21) !important;
}
.text-yellow-c-600 {
background-color: rgb(202 138 4) !important;
}
/ completed /
.bg-green-c-100 {
background-color: rgb(220 252 231) !important;
}
.fill-green-c-400 {
background-color: rgb(74 222 128) !important;
}
.text-green-c-600 {
background-color: rgb(22 163 74) !important;
}
/ pending */
.bg-gray-c-100 {
background-color: rgb(243 244 246) !important;
}
.fill-gray-c-400 {
background-color: rgb(156 163 175) !important;
}
.text-gray-c-600 {
background-color: rgb(75 85 99) !important;
}
To make it work I just make some custom in theme
Solution
You can try something like this if you want.
Hi thanks, I will have to go with your solution as I don't want to have more custom css.
Your welcome