umami/components/Icon.js

19 lines
441 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-07 07:03:02 +02:00
[styles.xl]: size === 'XL',
2020-08-06 08:03:07 +02:00
[styles.large]: size === 'L',
[styles.medium]: size === 'M',
[styles.small]: size === 'S',
})}
>
{icon}
</div>
);
}