mirror of https://github.com/mifi/lossless-cut
parent
b855e9e7d1
commit
cc202b4845
@ -1,12 +1,11 @@
|
||||
import { ButtonHTMLAttributes, memo } from 'react';
|
||||
import { ButtonHTMLAttributes, DetailedHTMLProps, forwardRef } from 'react';
|
||||
|
||||
import styles from './Button.module.css';
|
||||
|
||||
function Button({ type = 'button', ...props }: ButtonHTMLAttributes<HTMLButtonElement>) {
|
||||
return (
|
||||
// eslint-disable-next-line react/jsx-props-no-spreading, react/button-has-type
|
||||
<button className={styles['button']} type={type} {...props} />
|
||||
);
|
||||
}
|
||||
// eslint-disable-next-line react/display-name
|
||||
const Button = forwardRef<HTMLButtonElement, DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>(({ type = 'button', ...props }, ref) => (
|
||||
// eslint-disable-next-line react/jsx-props-no-spreading, react/button-has-type
|
||||
<button ref={ref} className={styles['button']} type={type} {...props} />
|
||||
));
|
||||
|
||||
export default memo(Button);
|
||||
export default Button;
|
||||
|
||||
Loading…
Reference in New Issue