diff --git a/src/components/CardGroup.tsx b/src/components/CardGroup.tsx index d4b335f..647ec7b 100644 --- a/src/components/CardGroup.tsx +++ b/src/components/CardGroup.tsx @@ -1,4 +1,5 @@ import React from "react" +import Card from "../types/Card" import CardGroup from "../types/CardGroup" import Side from "../types/Side" import CardComp from "./Card" @@ -33,6 +34,18 @@ const CardGroupComp: React.FC = ({cardGroup,side,onChange,onRemove}) => { )} /> )} +
onChange?.( + new CardGroup( + cardGroup.numInDeck, + ...cardGroup.cards, + new Card("New card",false,false) + ) + )} + > + Add card +
)