Skip to content

Instantly share code, notes, and snippets.

@tpjnorton
Last active November 22, 2020 16:22
Show Gist options
  • Save tpjnorton/36ae3ee8cafa5357ef2dc6747989a123 to your computer and use it in GitHub Desktop.
Save tpjnorton/36ae3ee8cafa5357ef2dc6747989a123 to your computer and use it in GitHub Desktop.
JS Button
// JS Version
import React from 'react'
import PropTypes from 'prop-types'
const Button = ({onClicked, ...rest}) => {
return <button onClick={onClicked} {...rest}/>
}
Button.propTypes = {
onClicked: PropTypes.func
}
export default Button;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment