From d5a88c6843d7770a6353a00b07dde926b8a3f99f Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Sat, 3 Feb 2018 00:24:42 +0100 Subject: [PATCH] use my button component for removing --- client/src/App.css | 2 +- client/src/App.js | 4 ++-- client/src/Button.js | 2 +- client/src/LatestList.js | 5 +++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/client/src/App.css b/client/src/App.css index 907afd8..20ea66e 100644 --- a/client/src/App.css +++ b/client/src/App.css @@ -2,7 +2,7 @@ header h1 { margin-left: 12px; } -button { +.p-button { margin-top: 12px; margin-right: 12px; margin-bottom: 12px; diff --git a/client/src/App.js b/client/src/App.js index cfa9fd4..d5f7b8f 100644 --- a/client/src/App.js +++ b/client/src/App.js @@ -25,8 +25,8 @@ class App extends Component {
- +
{props.text} + ); } diff --git a/client/src/LatestList.js b/client/src/LatestList.js index 22c5dbc..afe231a 100644 --- a/client/src/LatestList.js +++ b/client/src/LatestList.js @@ -1,4 +1,5 @@ import React from 'react'; +import Button from './Button'; export default function(props) { const latest = props.latest || []; @@ -6,9 +7,9 @@ export default function(props) { const created = new Date(item.created); return (
  • - props.onSelect(item)}>{created.toLocaleString()} + props.onSelect(item)}>{created.toLocaleString()} - props.onRemove(item)}>(Remove) +
  • ); });