Use css variables.
This commit is contained in:
@@ -3,9 +3,9 @@ import classNames from 'classnames';
|
||||
import Icon from './Icon';
|
||||
import styles from './Button.module.css';
|
||||
|
||||
export default function Button({ icon, children, className, onClick }) {
|
||||
export default function Button({ icon, type = 'button', children, className, onClick = () => {} }) {
|
||||
return (
|
||||
<button type="button" className={classNames(styles.button, className)} onClick={onClick}>
|
||||
<button type={type} className={classNames(styles.button, className)} onClick={onClick}>
|
||||
{icon && <Icon icon={icon} />}
|
||||
{children}
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user