diff --git a/src/Element/Element.php b/src/Element/Element.php index ccb0cdd..af039ce 100644 --- a/src/Element/Element.php +++ b/src/Element/Element.php @@ -160,10 +160,9 @@ public function options(): array */ public function withOptions(array $options = []): static { - $this->options = array_merge( - $this->options, - $options - ); + foreach($options as $key => $value){ + $this->withOption($key, $value); + } return $this; }