Skip to content

Commit cc6a8a1

Browse files
authored
Update VIcon.php
1 parent 5e5ee53 commit cc6a8a1

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

wfc/ui/vuetify/VIcon.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,15 @@ public function __construct(string $icon = 'mdi-information', array $iconProps =
2828
* The 'mdi' part can be omitted of the name as it is optional.
2929
*/
3030
public function setIcon(string $icon) {
31-
$sub = substr($icon, 0, 3);
31+
$isSlot = $icon[0] == '{' && $icon[1] == '{';
3232

33-
if ($sub !== 'mdi') {
34-
$icon = 'mdi-'.$icon;
33+
if (!$isSlot) {
34+
$sub = substr($icon, 0, 3);
35+
36+
if ($sub !== 'mdi') {
37+
$icon = 'mdi-'.$icon;
38+
}
3539
}
36-
3740
$this->getChild(0)->setText($icon);
3841
}
3942
}

0 commit comments

Comments
 (0)