Skip to content

Commit d730552

Browse files
authored
FontAwesome Icon: replace <span> with <i> element (#1209)
* Update ColumnActionTest.phpt * Update TButtonTryAddIcon.php Icons on buttons from the FontAwesome library didn’t work — they no longer use <span>, but <i>.
1 parent 826e82f commit d730552

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Traits/TButtonTryAddIcon.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function tryAddIcon(Html $el, ?string $iconString, string $name): void
1717
$iconClass .= ' ' . Datagrid::$iconPrefix . $icon;
1818
}
1919

20-
$el->addHtml(Html::el('span')->setAttribute('class', trim($iconClass)));
20+
$el->addHtml(Html::el('i')->setAttribute('class', trim($iconClass)));
2121

2222
if (mb_strlen($name) > 1) {
2323
$el->addHtml('&nbsp;');

tests/Cases/ColumnActionTest.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ final class ColumnActionTest extends TestCase
8383
$action->setIcon('user');
8484

8585
Assert::same(
86-
'<a href="doStuff!?id=1" class="btn btn-xs btn-default btn-secondary"><span class="icon-user"></span>&nbsp;Do</a>',
86+
'<a href="doStuff!?id=1" class="btn btn-xs btn-default btn-secondary"><i class="icon-user"></i>&nbsp;Do</a>',
8787
$this->render($action)
8888
);
8989
}

0 commit comments

Comments
 (0)