mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 17:55:08 +01:00
14 lines
413 B
JavaScript
14 lines
413 B
JavaScript
import React from 'react';
|
|
import classNames from 'classnames';
|
|
import Icon from './Icon';
|
|
import styles from './Button.module.css';
|
|
|
|
export default function Button({ icon, type = 'button', children, className, onClick = () => {} }) {
|
|
return (
|
|
<button type={type} className={classNames(styles.button, className)} onClick={onClick}>
|
|
{icon && <Icon icon={icon} />}
|
|
{children}
|
|
</button>
|
|
);
|
|
}
|