diff --git a/src/Screen/Actions/ModalToggle.php b/src/Screen/Actions/ModalToggle.php index ab451e357..5ae0ca52e 100644 --- a/src/Screen/Actions/ModalToggle.php +++ b/src/Screen/Actions/ModalToggle.php @@ -10,7 +10,6 @@ * Class ModalToggle. * * @method ModalToggle name(string $name = null) - * @method ModalToggle modal(string $modalName = null) * @method ModalToggle icon(string $icon = null) * @method ModalToggle class(string $classes = null) * @method ModalToggle modalTitle(string $title) @@ -50,4 +49,21 @@ public function asyncParameters($options = []): self ->parameters(Arr::wrap($options)) ->set('async', 'true'); } + + /** + * @param string $name + * @param array $options + * + * @return $this|\Orchid\Screen\Actions\Button + */ + public function modal(string $name, array $options = []) + { + $this->set('modal', $name); + + if(!empty($options)) { + $this->asyncParameters($options); + } + + return $this; + } }