Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions frontend/src/app/Pack/Items.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -57,19 +57,20 @@ const Items: React.FC<ItemsProps> = ({ items, unit }) => {
{notes}
</ItemNotes>
);
let quantityString = parseFloat(quantity.toString());
return (
<Row gutter={16} key={item.id} className="item-row">
<Col span={18}>
<Col span={6}>
<ItemName>
<ItemQuantity>{quantityString} x </ItemQuantity>
{name}
</ItemName>
{NotesRow}
</Col>
<Col span={12}>
<ItemDescription>
{itemDesc(product_url, product_name)}
</ItemDescription>
<ItemQuantity>
Quantity: {quantity}
</ItemQuantity>
{NotesRow}
</Col>
<Col span={2} className="align-right">
{worn && (
Expand Down
8 changes: 1 addition & 7 deletions frontend/src/app/Pack/Pack.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,7 +20,7 @@ import Items from './Items';

import { getWeightByCategory } from 'lib/utils/weight';

import { Credit, PackWrapper, SectionHeader, SectionTitle, TripDescription, ItemsFooter } from "./styles";
import { Credit, PackWrapper, SectionHeader, SectionTitle, TripDescription } from "./styles";

const Pack: React.FC<PackSpecs.Props> = ({ getPack, weightUnit, packId }) => {
const [loading, setLoading] = React.useState<boolean>(true);
Expand DownExpand Up@@ -113,12 +113,6 @@ const Pack: React.FC<PackSpecs.Props> = ({ getPack, weightUnit, packId }) => {
</div>
</SectionHeader>
<Items items={pack.items} unit={unit}/>
<ItemsFooter>
<WeightSelector
unit={unit}
items={pack.items}
selectUnit={unit => setUnit(unit)}/>
</ItemsFooter>
</PackWrapper>
</DocumentTitle>
);
Expand Down
14 changes: 10 additions & 4 deletions frontend/src/app/Pack/styles.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -55,6 +55,7 @@ export const TripDescription = styled.p`
`;

export const ItemName = styled.h4`
display: inline;
font-family: "Open Sans", sans-serif;
font-weight: 700;
font-size: 1em;
Expand All@@ -63,19 +64,21 @@ export const ItemName = styled.h4`

span {
color: #888;
font-size: .9rem;
font-size: 1rem;
margin-left: 8px;
}
`;

export const ItemDescription = styled.p`
font-size: .85em;
font-size: 1em;
color: #888;
margin-bottom: 0;
line-height: 1rem;
`;

export const ItemQuantity = styled(ItemDescription)``;
export const ItemQuantity = styled(ItemDescription)`
display:inline;
`;

export const ItemNotes = styled.p`
line-height: 1.35rem;
Expand All@@ -96,8 +99,11 @@ export const ItemsFooter = styled.div`

export const CategorySection = styled.div`
.item-row {
padding: 8px;
padding: 5px;
border-bottom: 1px dashed #EEE;
&:hover {
background-color: #F0F7FA;
}
}

.item-row:last-of-type {
Expand Down