-
-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for the glypicons in the widgets #31
Conversation
Added ability to specify icon as HTML. |
This one is more end-user friendly then #32, but affects widget internal label composition logic. |
What if I want icons after labels? |
Yes, this is one of the problems. |
For example: echo Button::widget([
'label' => ['ok-sign', 'Approve'],
]);
// or
echo Button::widget([
'label' => [
'icon' => 'ok-sign',
'label' => '<b>Approve</b>',
'encode' => false,
],
]); |
It whould be nice to hear @crisu83 opinion on this matter. |
Lately I've become more and more convinced that while this kind of logic is kind of nice to have, a more simple and better solution would be to have the user to add the icon in the label itself (through an icon helper of course). An example of this approach would be: 'label' => yii\bootstrap\Html::icon('ok-sign') . ' <b>Approve</b>',
'encode' => false, |
@klimov-paul I'm on the side of @crisu83 |
Then what about #32 ? Is that what you whant? |
@klimov-paul #32 - what if I would like to use other set of icons (e.g. font-awesome or ionicons)? This way - I will be forced to extend the base Like
This is just a suggestion. |
You ARE able to do so. See the unit tests. |
@klimov-paul sorry, didn't noticed that case. |
I'm for #32. |
Closed in favour #34 |
Fix for yiisoft/yii2#5207
Added support for the glypicons in the widgets