Skip to content

Commit 50be2c0

Browse files
committed
got something basic displayed from a component
1 parent 562562b commit 50be2c0

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

app/src/App.tsx

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

45
function App() {
56
const [count, setCount] = useState(0)
67

78
return (
89
<>
10+
<ProductRow item="rat food" price={6} />
911
</>
1012
)
1113
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
interface Props {
2+
item: string
3+
price: number
4+
}
5+
6+
export default function ProductRow(props: Props) {
7+
return (
8+
<div>
9+
<span>{props.item}</span>
10+
<span>${props.price}</span>
11+
</div>
12+
)
13+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from "./ProductRow.tsx"

0 commit comments

Comments
 (0)