name = $name; } public function render(): Closure { return function (array $data) { $attributes = $data['attributes']->getIterator()->getArrayCopy(); $class = $attributes['class'] ?? ''; unset($attributes['class']); return svg($this->name, $class, $attributes)->toHtml(); }; } }