codenco-dev / nova-grid-system

Nova grid system for Laravel Nova
80 stars 33 forks source link

bug:required field class is wrong: text-danger =>text-red-500 #30

Open imnpc opened 1 year ago

imnpc commented 1 year ago

required field class is wrong,is not red. vendor/codenco-dev/nova-grid-system/resources/js/components/DefaultField.vue

Now: text-danger Need change to: text-red-500

Nova default required class is:text-red-500

garrettmassey1 commented 6 months ago

A quick fix I used for this was to add a custom css file to Nova in the boot method of NovaServiceProvider

public function boot(): void
{
        /*
        |-------------------------------------
        | NOVA Additional CSS for adding back
        | the text-danger class lost from the
        | codenco-dev/nova-grid-system package
        |-------------------------------------
        */
        Nova::style('admin', asset('/assets/css/admin.css'));
        //...
}

admin.css

.text-danger {
    color: #b91c1c !important;
}
.text-primary-100 {
    /* your values here */
}

I did the same thing for the primary color (text-primary-500) since that is also overwritten somewhere in the package.

It's not a fix on the package level but it's an easy workaround.