From 9498dc3f629fd77160925f8969cc88c6fe140d87 Mon Sep 17 00:00:00 2001 From: Eva Langerova Date: Tue, 8 Oct 2024 23:45:46 +0200 Subject: [PATCH 01/10] adjust styling of components, forms, buttons and views to make them visually consistent. refactor repeated styles into custom classes --- src/components/AddItem.jsx | 78 +++++++++++++---------------- src/components/AddList.jsx | 39 +++++++-------- src/components/ListItem.css | 14 ------ src/components/ListItem.jsx | 17 +++---- src/components/SingleList.css | 10 ---- src/components/SingleList.jsx | 10 ++-- src/index.css | 87 +++++++++++++++++++++++--------- src/views/Home.css | 10 ---- src/views/Home.jsx | 93 +++++++++++++++++------------------ src/views/Layout.jsx | 22 ++++----- src/views/List.jsx | 30 +++++------ src/views/ManageList.jsx | 56 ++++++++++++--------- tailwind.config.js | 6 +++ 13 files changed, 237 insertions(+), 235 deletions(-) delete mode 100644 src/components/ListItem.css delete mode 100644 src/components/SingleList.css delete mode 100644 src/views/Home.css diff --git a/src/components/AddItem.jsx b/src/components/AddItem.jsx index f53c307..3b90bca 100644 --- a/src/components/AddItem.jsx +++ b/src/components/AddItem.jsx @@ -68,56 +68,46 @@ export function AddItem({ data, listPath }) { }; return ( -
-
+
+ {/* Item Name Section */} -
- - - - +
+ +
{/* Urgency Section */} -
- - - - +
+ +
- diff --git a/src/components/AddList.jsx b/src/components/AddList.jsx index 9002093..2dbfdee 100644 --- a/src/components/AddList.jsx +++ b/src/components/AddList.jsx @@ -24,27 +24,26 @@ export function AddList({ setListPath, userId, userEmail }) { }; return ( - <> - - - setListName(e.target.value)} - placeholder="Enter the name of your new list" - required - /> - - +
); } diff --git a/src/components/ListItem.css b/src/components/ListItem.css deleted file mode 100644 index 53a71f6..0000000 --- a/src/components/ListItem.css +++ /dev/null @@ -1,14 +0,0 @@ -.list-item { - background-color: #ffe5cf; - border: 2px solid #e5e7eb; - border-color: #ff885b; - margin: 5px; - transition: - background-color 0.3s, - box-shadow 0.3s; -} - -.list-item:hover { - background-color: #ff885b; - box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); -} diff --git a/src/components/ListItem.jsx b/src/components/ListItem.jsx index 8581c8f..a799a46 100644 --- a/src/components/ListItem.jsx +++ b/src/components/ListItem.jsx @@ -1,5 +1,4 @@ import { useState, useEffect } from 'react'; -import './ListItem.css'; import { FaTrashCan, FaCartShopping } from 'react-icons/fa6'; export function ListItem({ @@ -42,24 +41,24 @@ export function ListItem({ }; return ( -
-
-