diff --git a/grocery-list-fe/src/apiCalls.js b/grocery-list-fe/src/apiCalls.js index e9d84ab..b4b1446 100644 --- a/grocery-list-fe/src/apiCalls.js +++ b/grocery-list-fe/src/apiCalls.js @@ -21,4 +21,8 @@ const getGroceryList = async id => { return response.data || []; }; +const deleteItem = async () => { + return Promise.resolve('OK'); +}; + export { addGroceryList, addItem, getGroceryLists, getGroceryList }; diff --git a/grocery-list-fe/src/components/Item/Item.css b/grocery-list-fe/src/components/Item/Item.css index 18f410f..b28644f 100644 --- a/grocery-list-fe/src/components/Item/Item.css +++ b/grocery-list-fe/src/components/Item/Item.css @@ -9,3 +9,18 @@ li { .quantity { width: auto; } + +.deleteButton { + background: transparent; + border: 1px solid black; + border-radius: 2em; + color: black; + display: inline-block; + font-size: 12px; + height: 3em; + line-height: 1.5em; + margin: 0 0 8px; + padding: 0; + text-align: center; + width: 3em; +} diff --git a/grocery-list-fe/src/components/Item/Item.js b/grocery-list-fe/src/components/Item/Item.js index 97ce951..4551b62 100644 --- a/grocery-list-fe/src/components/Item/Item.js +++ b/grocery-list-fe/src/components/Item/Item.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import './Item.css'; function Item(props) { - const { name, quantity } = props; + const { name, quantity, onDeleteHandler } = props; return (