mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 13:47:15 +01:00
Website edit functionality.
This commit is contained in:
parent
30b87bc4c4
commit
00e232fee8
63 changed files with 301 additions and 94 deletions
27
components/interface/Button.js
Normal file
27
components/interface/Button.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import Icon from './Icon';
|
||||
import styles from './Button.module.css';
|
||||
|
||||
export default function Button({
|
||||
type = 'button',
|
||||
icon,
|
||||
size,
|
||||
children,
|
||||
className,
|
||||
onClick = () => {},
|
||||
}) {
|
||||
return (
|
||||
<button
|
||||
type={type}
|
||||
className={classNames(styles.button, className, {
|
||||
[styles.small]: size === 'S',
|
||||
[styles.large]: size === 'L',
|
||||
})}
|
||||
onClick={onClick}
|
||||
>
|
||||
{icon && <Icon icon={icon} size={size} />}
|
||||
{children}
|
||||
</button>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue