Skip to content

Instantly share code, notes, and snippets.

@tpjnorton
Last active November 22, 2020 16:22
Show Gist options
  • Save tpjnorton/528fedaf10dfe0e952531b4c27b608e7 to your computer and use it in GitHub Desktop.
Save tpjnorton/528fedaf10dfe0e952531b4c27b608e7 to your computer and use it in GitHub Desktop.
TS Button
// TS Version
import React from 'react'
interface ButtonProps extends React.HTMLProps<HTMLButtonElement> {
onClicked?: () => void
}
const Button = ({onClicked, ...rest}:) => {
return <button onClick={onClicked} {...rest}/>
}
export default Button;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment