umami/components/common/Icon.js

19 lines
462 B
JavaScript
Raw Normal View History

import React from 'react';
import classNames from 'classnames';
import styles from './Icon.module.css';
2020-08-06 08:03:07 +02:00
export default function Icon({ icon, className, size = 'M' }) {
return (
<div
className={classNames(styles.icon, className, {
2020-08-09 08:48:43 +02:00
[styles.xlarge]: size === 'xlarge',
[styles.large]: size === 'large',
[styles.medium]: size === 'medium',
[styles.small]: size === 'small',
2020-08-06 08:03:07 +02:00
})}
>
{icon}
</div>
);
}