parent
069093b774
commit
dff50a1c50
7 changed files with 44 additions and 6 deletions
Before Width: | Height: | Size: 617 B After Width: | Height: | Size: 617 B |
Before Width: | Height: | Size: 525 B After Width: | Height: | Size: 525 B |
Before Width: | Height: | Size: 182 B After Width: | Height: | Size: 182 B |
@ -0,0 +1,27 @@ |
|||||||
|
import React, { useState } from "react"; |
||||||
|
|
||||||
|
import ProductSalesDesign1 from "./ProductSalesDesign1"; |
||||||
|
import ProductSalesDesign2 from "./ProductSalesDesign2"; |
||||||
|
|
||||||
|
function ProductSalesAmount() { |
||||||
|
const list = { |
||||||
|
1: <ProductSalesDesign1 />, |
||||||
|
1: <ProductSalesDesign2 />, |
||||||
|
}; |
||||||
|
const [type, setType] = useState(1); |
||||||
|
return ( |
||||||
|
<div className="w-full flex flex-col items-center"> |
||||||
|
<select |
||||||
|
className="mb-10 w-20 bg-gray-200" |
||||||
|
onChange={(e) => setType(e.target.value)} |
||||||
|
> |
||||||
|
{Object.keys(list).map((option, index) => ( |
||||||
|
<option key={index}>{option}</option> |
||||||
|
))} |
||||||
|
</select> |
||||||
|
{list[type]} |
||||||
|
</div> |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
export default ProductSalesAmount; |
Loading…
Reference in new issue