|
|
@@ -35,8 +35,9 @@ class FontAwesome5Icon extends AbstractIcon {
|
|
|
* @return string
|
|
|
*/
|
|
|
public function render(string $icon, array $options = [], array $attributes = []): string {
|
|
|
- $formatOptions = $attributes + [
|
|
|
- ];
|
|
|
+ if (!empty($this->config['attributes'])) {
|
|
|
+ $attributes += $this->config['attributes'];
|
|
|
+ }
|
|
|
|
|
|
$class = [
|
|
|
$this->config['namespace'],
|
|
|
@@ -63,7 +64,7 @@ class FontAwesome5Icon extends AbstractIcon {
|
|
|
if (!empty($attributes['class'])) {
|
|
|
$options['class'] .= ' ' . $attributes['class'];
|
|
|
}
|
|
|
- $options['attributes'] = $this->template->formatAttributes($formatOptions, ['class']);
|
|
|
+ $options['attributes'] = $this->template->formatAttributes($attributes, ['class']);
|
|
|
|
|
|
return $this->template->format('icon', $options);
|
|
|
}
|