Skip to content

Commit

Permalink
基礎sell介面v1
Browse files Browse the repository at this point in the history
  • Loading branch information
AnaAngle committed Nov 23, 2024
1 parent 9e091b7 commit 4223347
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 18 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.6",
"postcss": "^8.4.45",
"tailwindcss": "^3.4.10",
"tailwindcss": "^3.4.14",
"typescript": "^5.2.2",
"vite": "^5.2.10",
"vite-plugin-pwa": "^0.20.0",
Expand Down
22 changes: 9 additions & 13 deletions src/routes/sales/add_sell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,21 @@ const styles = {
color: 'black',
},
grid: {
padding: 10,
padding: '10px',
display: 'flex',
flexWrap: 'wrap',
gap: '10px',
justifyContent: 'space-between',
gap: 10,
},
card: {
width: '50%',
marginBottom: 10,
padding: 10,
flex: '1 1 calc(25% - 10px)',
maxWidth: 'calc(25% - 10px)',
marginBottom: '10px',
padding: '10px',
backgroundColor: '#555',
borderRadius: 10,
borderRadius: '10px',
color: 'white',
boxSizing: 'border-box',
},
productName: {
fontSize: 16,
Expand Down Expand Up @@ -116,13 +119,6 @@ function EventSale() {
<p style={styles.productInfo}>價格: {p.price}</p>
</div>
))
}{
sales.map((p) => (
<div key={p.id} style={styles.card}>
<h1 style={styles.productName}>{p.product}</h1>
<p style={styles.productInfo}>價格: {p.price}</p>
</div>
))
}
</div>
</div>
Expand Down

0 comments on commit 4223347

Please sign in to comment.