Skip to content

Commit dd22aaf

Browse files
committed
beginnings of product table
1 parent 3148c6e commit dd22aaf

File tree

8 files changed

+26
-4
lines changed

8 files changed

+26
-4
lines changed

app/src/App.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import { useState } from 'react'
22
import './App.css'
3-
import ProductRow from "./components/ProductRow/index"
3+
import ProductTable from "./components/ProductTable/index"
44

55
function App() {
66
const [count, setCount] = useState(0)
77

88
return (
9-
<>
10-
<ProductRow item="rat food" price={6} />
11-
</>
9+
<ProductTable />
1210
)
1311
}
1412

app/src/components/FilterableProductTable/component.tsx

Whitespace-only changes.

app/src/components/FilterableProductTable/index.ts

Whitespace-only changes.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
interface Prop {
2+
category: string
3+
}
4+
5+
export default function ProductCategoryRow(props: Props) {
6+
return (
7+
<div>{props.category}</div>
8+
)
9+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from "./ProductCategoryRow.tsx"

app/src/components/ProductRow/ProductRow.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
interface Props {
22
item: string
33
price: number
4+
stocked: boolean
45
}
56

67
export default function ProductRow(props: Props) {
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import ProductCategoryRow from "../ProductCategoryRow/index"
2+
import ProductRow from "../ProductRow/index"
3+
4+
export default function ProductTable() {
5+
return (
6+
<>
7+
<ProductCategoryRow category="Vegetables" />
8+
<ProductRow item="Lettuce" price={6} stocked={true} />
9+
</>
10+
)
11+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export { default } from "./ProductTable.tsx"
2+

0 commit comments

Comments
 (0)