Bővítés a 4. feladatig megvan.
This commit is contained in:
29
src/components/Statisztika.jsx
Normal file
29
src/components/Statisztika.jsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import React from 'react'
|
||||
|
||||
const Statisztika = ({total, megvett}) => {
|
||||
|
||||
const megvenni = total-megvett;
|
||||
|
||||
return (
|
||||
<div>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Összesen:</th>
|
||||
<td>{total}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Megvett:</th>
|
||||
<td>{megvett}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Beszerzendő:</th>
|
||||
<td>{megvenni}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Statisztika
|
||||
Reference in New Issue
Block a user