Skip to content

Commit 7bd9fea

Browse files
committed
making adjustments to use RB 1 Container on list, adjust classes on edit buttons for styling, list item classes for responsiveness
1 parent 1a8a0e8 commit 7bd9fea

File tree

5 files changed

+21
-20
lines changed

5 files changed

+21
-20
lines changed

src/components/ListItem.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,13 @@ export function ListItemCheckBox({ item, listPath }: Props) {
122122
};
123123

124124
return (
125-
126125
<div className="d-flex flex-column justify-content-center mt-5">
127126
<span
128127
className={`UrgencyStatus text-nowrap ms-5 px-5 ${urgencyStatus.replace(/\s/g, "-")}`}
129128
>
130129
{urgencyStatus}
131130
</span>
132-
<section className="ListItemBox custom-borders d-flex p-2 m-1">
131+
<section className="ListItemBox custom-borders d-flex p-2 m-1 align-items-center">
133132
<section className="d-flex flex-grow-1 PurchaseItem">
134133
<Form.Check
135134
className="me-3"
@@ -142,14 +141,14 @@ export function ListItemCheckBox({ item, listPath }: Props) {
142141
aria-checked={isChecked}
143142
disabled={isChecked}
144143
/>
145-
<h4 className="text-nowrap me-1 mb-0"> {item.name} </h4>
144+
<Form.Label className="">{item.name}</Form.Label>
146145
</section>
147146

148-
<section className="EditItem d-flex gap-sm-4 align-items-end">
147+
<section className="EditItem d-flex gap-2 align-items-end">
149148
<ItemQuantityForm saveItemQuantity={editItemQuantity} item={item} />
150149

151150
<Button
152-
className="DeleteButton mt-auto w-auto ms-2 "
151+
className="DeleteButton w-auto"
153152
variant="danger"
154153
onClick={() => deleteItemHandler()}
155154
>

src/components/NavBar.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
color: $secondary-blue;
3030
}
3131
}
32+
}
3233

33-
.navbar .navbar-toggler {
34-
background-color: $primary-beige;
35-
}
34+
.navbar .navbar-toggler {
35+
background-color: $primary-beige;
3636
}
3737

3838
.navbar button {

src/components/forms/ItemQuantityForm.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,23 +63,22 @@ export function ItemQuantityForm({
6363
<div>
6464
{edit ? (
6565
<>
66-
<Button className="custom-button" onClick={updateItemQuantity}>
67-
<span className="d-none d-md-inline"> Save </span>
66+
<Button variant="dark" onClick={updateItemQuantity}>
67+
<span className="d-none d-md-inline text-primary">Save</span>
6868
<IoMdCheckmark className="d-block d-md-none" />
6969
</Button>{" "}
70-
<Button className="custom-button" onClick={toggleEdit}>
71-
<span className="d-none d-md-inline">Cancel</span>
70+
<Button variant="dark" onClick={toggleEdit}>
71+
<span className="d-none d-md-inline text-primary">Cancel</span>
7272
<GiCancel className="d-block d-md-none" />
7373
</Button>
7474
</>
7575
) : (
76-
<Button className="custom-button" onClick={toggleEdit}>
77-
<span className="d-none d-md-inline">Edit</span>
76+
<Button variant="dark" onClick={toggleEdit}>
77+
<span className="d-none d-md-inline text-primary">Edit</span>
7878
<FaEdit className="d-block d-md-none" />
7979
</Button>
8080
)}
8181
</div>
8282
</div>
83-
8483
);
8584
}

src/styles/global.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ $theme-colors: (
55
"secondary": $primary-blue,
66
"info": $tertiary-blue,
77
"dark": $secondary-blue,
8+
"danger": #dc3545,
89
);
910

1011
$font-size-root: null;
@@ -26,14 +27,13 @@ body {
2627
text-align: center;
2728
border: none;
2829
padding: 0.5rem;
29-
width: 11rem;
3030

3131
&:hover {
3232
background-color: $secondary-blue;
3333
color: $primary-beige;
3434
}
3535
}
3636

37-
a svg {
37+
svg {
3838
fill: $primary-beige;
3939
}

src/views/authenticated/List.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useState, useMemo, useRef } from "react";
44
import { ListItemCheckBox } from "../../components/ListItem";
55
import { FilterListInput } from "../../components/FilterListInput";
66
import { ListItem, comparePurchaseUrgency } from "../../api";
7-
import { Container } from "react-bootstrap";
7+
import Container from "react-bootstrap/Container";
88
import Button from "react-bootstrap/Button";
99
import ShareListForm from "../../components/forms/ShareListForm";
1010
import { AddItemForm } from "../../components/forms/AddItemForm";
@@ -75,7 +75,7 @@ export function List({ data: unfilteredListItems, listPath }: Props) {
7575

7676
// Main content when list is not empty
7777
return (
78-
<Container className="ListPageContainer ">
78+
<Container>
7979
<div className="ListItemSection">
8080
<header>
8181
<h2 className="ListName p-1 m-2 mt-2">{listName}</h2>
@@ -104,7 +104,10 @@ export function List({ data: unfilteredListItems, listPath }: Props) {
104104
</div>
105105

106106
<ShareListForm listPath={listPath} />
107-
<Button className="d-md-none mt-3" onClick={scrollToViewList}>
107+
<Button
108+
className="d-md-none mt-3 custom-button align-self-center"
109+
onClick={scrollToViewList}
110+
>
108111
{"View List"}
109112
</Button>
110113
</Container>

0 commit comments

Comments
 (0)