Browse Source

Add shimming

mscherer 1 year ago
parent
commit
30a5ba40a6

+ 6 - 0
src/View/Icon/FontAwesome4Icon.php

@@ -38,6 +38,12 @@ class FontAwesome4Icon extends AbstractIcon {
 			$attributes += $this->config['attributes'];
 		}
 
+		// Shimming
+		if (isset($options['title'])) {
+			$attributes['title'] = $options['title'];
+            unset($options['title']);
+		}
+
 		$namespace = 'fa';
 
 		$class = [

+ 6 - 0
src/View/Icon/FontAwesome5Icon.php

@@ -39,6 +39,12 @@ class FontAwesome5Icon extends AbstractIcon {
 			$attributes += $this->config['attributes'];
 		}
 
+		// Shimming
+		if (isset($options['title'])) {
+			$attributes['title'] = $options['title'];
+			unset($options['title']);
+		}
+
 		$class = [
 			$this->config['namespace'],
 		];

+ 6 - 0
src/View/Icon/FontAwesome6Icon.php

@@ -39,6 +39,12 @@ class FontAwesome6Icon extends AbstractIcon {
 			$attributes += $this->config['attributes'];
 		}
 
+		// Shimming
+		if (isset($options['title'])) {
+			$attributes['title'] = $options['title'];
+			unset($options['title']);
+		}
+
 		$namespace = 'fa-' . $this->config['namespace'];
 
 		$class = [