Components\ToggleButtons::make('option-1')
->boolean(), // pretty, but does not handle null
Components\ToggleButtons::make('option-2')
->boolean()
->nullable(), // exactly the same as option-1
Components\ToggleButtons::make('option-3')
->options([
null => 'Default (On)', // saves, but is not selected on load
true => 'On', // may need to add colors & icons
false => 'Off',
]),
Components\ToggleButtons::make('option-4')
// pretty; handles labels, colors and icons from enum class;
// but does not handle null and cannot be deselected.
->options(CommentNotificationOption::class),
Components\ToggleButtons::make('option-1')
->boolean(), // pretty, but does not handle null
Components\ToggleButtons::make('option-2')
->boolean()
->nullable(), // exactly the same as option-1
Components\ToggleButtons::make('option-3')
->options([
null => 'Default (On)', // saves, but is not selected on load
true => 'On', // may need to add colors & icons
false => 'Off',
]),
Components\ToggleButtons::make('option-4')
// pretty; handles labels, colors and icons from enum class;
// but does not handle null and cannot be deselected.
->options(CommentNotificationOption::class),