From 71911063b0107e5b22311a970387c0254fe8e7b1 Mon Sep 17 00:00:00 2001 From: mrfry Date: Thu, 4 Mar 2021 21:31:32 +0100 Subject: [PATCH] Added comments to news items --- src/components/comments.js | 169 ++++++++++++++++++++++++++ src/components/comments.module.css | 80 ++++++++++++ src/components/newsEntry.js | 33 ++++- src/components/reactButton.js | 3 + src/components/reactButton.module.css | 10 +- src/components/tooltip.js | 8 +- src/components/tooltip.module.css | 1 - src/constants.json | 2 +- src/pages/index.js | 73 ++++++++++- 9 files changed, 357 insertions(+), 22 deletions(-) create mode 100644 src/components/comments.js create mode 100644 src/components/comments.module.css diff --git a/src/components/comments.js b/src/components/comments.js new file mode 100644 index 0000000..909e573 --- /dev/null +++ b/src/components/comments.js @@ -0,0 +1,169 @@ +import React, { useState } from 'react' + +import ReactButton from './reactButton.js' + +import styles from './comments.module.css' + +function CommentInput({ onSubmit }) { + const [val, setVal] = useState('') + return ( +
+