Action::make('test')
->button()
->label(function ($record) :string {
if ($record->isTypeA())
{return 'Some text';
})
if $record->isTypeB())
{return 'Some different text';
})
->tooltip(function ($record) :string {
if ($record->isTypeA())
{return 'Some tootip text';
})
if $record->isTypeB())
{return 'Some different tooltip text';
}),
Action::make('test')
->button()
->label(function ($record) :string {
if ($record->isTypeA())
{return 'Some text';
})
if $record->isTypeB())
{return 'Some different text';
})
->tooltip(function ($record) :string {
if ($record->isTypeA())
{return 'Some tootip text';
})
if $record->isTypeB())
{return 'Some different tooltip text';
}),