Skip to content

Instantly share code, notes, and snippets.

@IchrakMansour
Last active August 15, 2018 19:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IchrakMansour/13480a3eb734956b9435c6a54f843266 to your computer and use it in GitHub Desktop.
Save IchrakMansour/13480a3eb734956b9435c6a54f843266 to your computer and use it in GitHub Desktop.
import React, {
Component
}
from 'react';
class LineItem extends Component {
constructor(props) {
super(props);
this.state = Object.assign({}, props.lineItemData);
this.handleDeleteClick = this.handleDeleteClick.bind(this);
}
handleDeleteClick() {
this.props.onDelete(this.props.id);
}
render() {
var center = {
textAlign: "center"
}
return (
<tr>
<td style={center}>
<Button onClick={this.handleDeleteClick} active size="sm" color="danger" className="btn-pill" aria-pressed="true">Effacer</Button>
</td></tr>
);
}
}
export default LineItem;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment