show pages in iframe

This commit is contained in:
Jan Prochazka
2020-05-17 10:57:24 +02:00
parent b024ef5a9b
commit a682df9253
7 changed files with 57 additions and 1 deletions

View File

@@ -4,6 +4,11 @@ import _ from 'lodash';
export function getIconImage(src, props) {
const { size = 16, style = {}, className, title } = props || {};
if (!src) return null;
if (src.startsWith('fas ') || src.startsWith('far ')) {
return <i className={src} />;
}
if (src.endsWith('.svg')) {
// eslint-disable-next-line
src = `${process.env.PUBLIC_URL}/icons/${src}`;