Slightly better chat (send with enter)
All checks were successful
Build Mau & Deploy Mau / build (push) Successful in 1m26s
Build Mau & Deploy Mau / deploy (push) Successful in 7m9s

This commit is contained in:
DTieman
2024-04-19 23:28:29 +02:00
parent 5f8c6994aa
commit e78d0d46f7
2 changed files with 14 additions and 13 deletions

View File

@@ -1,13 +1,10 @@
import React, {FunctionComponent} from "react";
import React, {ButtonHTMLAttributes, DetailedHTMLProps, FunctionComponent} from "react";
interface Props {
className?: string
onClick?: () => void
children?: React.ReactNode
}
export const GHButton: FunctionComponent<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>> = (props) => {
const {className, ...rest} = props;
export const GHButton: FunctionComponent<Props> = ({className, onClick, children}) => {
return (
<span className={`gh-button ${className}`} onClick={onClick}>{children}</span>
<button className={`gh-button ${className}`} {...rest}></button>
);
}