You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
648 B
27 lines
648 B
import React, { useState } from "react"; |
|
|
|
import CardTrelloDesign from "./CardTrelloDesign"; |
|
import ProcessCard from "./ProcessCard"; |
|
|
|
function CardDesgin() { |
|
const list = { |
|
1: <CardTrelloDesign />, |
|
2: <ProcessCard />, |
|
}; |
|
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 CardDesgin;
|
|
|