Only give dropdown menu items padding if they have an icon

This commit is contained in:
Toby Zerner 2015-05-14 22:24:59 +09:30
parent d85ae8745e
commit a2049feddf
2 changed files with 13 additions and 5 deletions

View File

@ -13,7 +13,7 @@ export default class ActionButton extends Component {
delete attrs.label;
attrs.href = attrs.href || 'javascript:;';
return m('a', attrs, [
return m('a'+(iconName ? '.has-icon' : ''), attrs, [
iconName ? icon(iconName+' icon') : '',
m('span.label', label)
]);

View File

@ -6,13 +6,21 @@
color: @fl-body-color;
.box-shadow(0 2px 6px @fl-shadow-color);
& > li > a:hover,
& > li > a:focus,
& > .active > a,
& > .active > a:hover,
& > .active > a:focus {
color: @fl-body-color;
background-color: @fl-body-control-bg;
}
& > li > a {
padding: 8px 15px 8px 40px;
padding: 8px 15px;
color: @fl-body-color;
&:hover, &:focus {
color: @fl-body-color;
background-color: @fl-body-control-bg;
&.has-icon {
padding-left: 40px;
}
&.disabled {
color: #aaa;