upline/row-background

Field to set row background.

Installs: 7 493

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:Vue

pkg:composer/upline/row-background

0.2.1 2020-10-08 10:56 UTC

This package is auto-updated.

Last update: 2025-10-08 22:37:22 UTC


README

Set background color to resource row and auto choose white or black text color.

Usage

Add to your resource file:

use Upline\RowBackground\RowBackground;

and field to fields section

RowBackground::make('Background color')->onlyOnIndex();

or (to set text color)

 RowBackground::make('Background color', function ($model) {
    return new RowBackgroundData($model->background_color, $model->text_color);
})->onlyOnIndex();

Note:
This package works pretty tricky:
It deletes a column that nova adds to index view.
If you know better ways to set row styles, please write me.