Skip to content

Instantly share code, notes, and snippets.

@mtheoryx
Created January 2, 2017 20:35
Show Gist options
  • Save mtheoryx/cfd50cf7bc4f392c11ecc50ee35d4203 to your computer and use it in GitHub Desktop.
Save mtheoryx/cfd50cf7bc4f392c11ecc50ee35d4203 to your computer and use it in GitHub Desktop.
DeleteButton.js
import React from 'react';
import './DeleteButton.css';
const DeleteButton = ({ onDelete, itemId }) => (
<button
className="DeleteButton"
onClick={ () => onDelete(itemId) }>
&nbsp;
</button>
);
DeleteButton.propTypes = {
onDelete: React.PropTypes.func.isRequired,
itemId: React.PropTypes.string.isRequired
};
export default DeleteButton;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment