Toggle::make('is_submitted')->label('Change here')->inline(false)->default(false)->reactive()
->afterStateUpdated(function ($state, $set){}) ->onColor('success')
->offColor('danger'),
Placeholder::make('status')->label('Currently')->content(function ($state, $get) {
$status = $get('is_submitted') === true ? 'Submitted' : 'Not Submitted';
$style = $status === 'Submitted' ? 'color: green;' : 'color: red;';
return new HtmlString("<span style='" . $style . "'>" . $status . "</span>");
})->extraAttributes(['class' => 'text-primary-500 mt-15 items-center font-bold text-xs']),
Toggle::make('is_submitted')->label('Change here')->inline(false)->default(false)->reactive()
->afterStateUpdated(function ($state, $set){}) ->onColor('success')
->offColor('danger'),
Placeholder::make('status')->label('Currently')->content(function ($state, $get) {
$status = $get('is_submitted') === true ? 'Submitted' : 'Not Submitted';
$style = $status === 'Submitted' ? 'color: green;' : 'color: red;';
return new HtmlString("<span style='" . $style . "'>" . $status . "</span>");
})->extraAttributes(['class' => 'text-primary-500 mt-15 items-center font-bold text-xs']),