Slightly better chat (send with enter)
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user