2020-08-04 08:20:35 +02:00
|
|
|
import React from 'react';
|
|
|
|
import classNames from 'classnames';
|
|
|
|
import styles from './Icon.module.css';
|
|
|
|
|
2020-09-13 10:26:54 +02:00
|
|
|
export default function Icon({ icon, className, size = 'medium', ...props }) {
|
2020-08-06 08:03:07 +02:00
|
|
|
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-09 12:04:48 +02:00
|
|
|
[styles.xsmall]: size === 'xsmall',
|
2020-08-06 08:03:07 +02:00
|
|
|
})}
|
2020-09-13 10:26:54 +02:00
|
|
|
{...props}
|
2020-08-06 08:03:07 +02:00
|
|
|
>
|
|
|
|
{icon}
|
|
|
|
</div>
|
|
|
|
);
|
2020-08-04 08:20:35 +02:00
|
|
|
}
|