Skip to content

Commit

Permalink
fix(limel-menu): decrease size of text and icons
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschmidt committed Sep 10, 2019
1 parent 6f4a3ea commit 962c765
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/list/list-renderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class ListRenderer {
aria-disabled={item.disabled ? 'true' : 'false'}
data-index={index}
>
{item.icon ? this.renderIcon(item) : null}
{item.icon ? this.renderIcon(config, item) : null}
{this.renderText(item.text, item.secondaryText)}
</li>
);
Expand Down Expand Up @@ -108,11 +108,12 @@ export class ListRenderer {
/**
* Render an icon for a list item
*
* @param {ListRendererConfig} config the config object, passed on from the `renderListItem` function
* @param {ListItem} item the list item
*
* @returns {HTMLElement} the icon element
*/
private renderIcon(item: ListItem) {
private renderIcon(config: ListRendererConfig, item: ListItem) {
const style = {};
if (item.iconColor) {
style['--icon-background-color'] = item.iconColor;
Expand All @@ -123,7 +124,7 @@ export class ListRenderer {
class="mdc-list-item__graphic"
name={item.icon}
style={style}
size="medium"
size={config.isMenu ? 'small' : 'medium'}
/>
);
}
Expand Down
8 changes: 8 additions & 0 deletions src/components/menu/menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,11 @@ $menu-item-background-color: #ebebeb;
}
}
}

.mdc-list-item[role="menuitem"] {
font-size: 1.3rem;

.mdc-list-item__graphic {
margin-right: 1.4rem;
}
}

0 comments on commit 962c765

Please sign in to comment.