Compare commits
No commits in common. "9685d94b968af0b0d7fd7ba1b8ceb91d7ec1d546" and "d8d2e9f8e43e30960c5526b627cc482eb343a8b7" have entirely different histories.
9685d94b96
...
d8d2e9f8e4
|
@ -41,11 +41,6 @@ const InfoCard: React.FC<InfoCardProps> = ({ onAdd, onHeightChange }) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleDelete = (index: number) => {
|
|
||||||
const newContents = addedContents.filter((_, i) => i !== index);
|
|
||||||
setAddedContents(newContents);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
<div className="flex items-center mb-3 w-full">
|
<div className="flex items-center mb-3 w-full">
|
||||||
|
@ -70,16 +65,9 @@ const InfoCard: React.FC<InfoCardProps> = ({ onAdd, onHeightChange }) => {
|
||||||
{addedContents.map((item, index) => (
|
{addedContents.map((item, index) => (
|
||||||
<div
|
<div
|
||||||
key={index}
|
key={index}
|
||||||
className="flex justify-between items-center p-2 border border-gray-200 rounded bg-gray-50 mb-2 last:mb-0"
|
className="p-2 border border-gray-200 rounded bg-gray-50 mb-2 last:mb-0"
|
||||||
>
|
>
|
||||||
<span>{item}</span>
|
{item}
|
||||||
<Button
|
|
||||||
type="text"
|
|
||||||
onClick={() => handleDelete(index)}
|
|
||||||
className="text-red-500"
|
|
||||||
>
|
|
||||||
X
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue