Use css variables.
This commit is contained in:
1 parent
5d4ff5cfa4
commit
a5930f1772
29 files changed
+131
-85
No files matched your search
@@ -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