using fonticon instead of span

This commit is contained in:
Jan Prochazka
2020-11-10 17:34:00 +01:00
parent 1169e23997
commit 1c2dedfef3
20 changed files with 77 additions and 42 deletions

View File

@@ -2,6 +2,7 @@ import React from 'react';
import theme from '../theme';
import styled from 'styled-components';
import { useCurrentWidget, useSetCurrentWidget } from '../utility/globalState';
import { FontIcon } from '../icons';
const IconWrapper = styled.div`
color: ${theme.widgetMenu.iconFontColor};
@@ -62,7 +63,7 @@ export default function WidgetIconPanel() {
onClick={() => setCurrentWidget(name === currentWidget ? null : name)}
title={title}
>
<span className={icon} />
<FontIcon icon={icon} />
</IconWrapper>
))}
</>