From a18ac47c72ba7faba1c5f0de02746389ec5c33ae Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Mon, 15 Nov 2021 01:22:46 +0100 Subject: [PATCH] css improvments --- public/index.html | 2 +- src/components/AddItem.tsx | 3 ++- src/components/App.tsx | 2 +- src/components/Card.tsx | 12 ++++++++---- src/components/CardGroup.tsx | 4 ++-- src/components/Deck.tsx | 4 ++-- src/index.css | 6 +++++- 7 files changed, 21 insertions(+), 12 deletions(-) diff --git a/public/index.html b/public/index.html index 691ec61..6b93284 100644 --- a/public/index.html +++ b/public/index.html @@ -10,7 +10,7 @@ /> CS:GO Retakes card editor - +
diff --git a/src/components/AddItem.tsx b/src/components/AddItem.tsx index 32d8556..5a11f85 100644 --- a/src/components/AddItem.tsx +++ b/src/components/AddItem.tsx @@ -14,6 +14,7 @@ const AddItem: React.FC = ({side,onChange}) => { return (
onChange?.(selected)} - className="cursor-pointer" + className="cursor-pointer float-right" > Add diff --git a/src/components/App.tsx b/src/components/App.tsx index 1d336eb..fa58937 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -18,7 +18,7 @@ function App() { )) return ( -
+
setCTDeck(newDeck)} />
); diff --git a/src/components/Card.tsx b/src/components/Card.tsx index 256ee6c..7f605ec 100644 --- a/src/components/Card.tsx +++ b/src/components/Card.tsx @@ -15,17 +15,21 @@ interface Props { const CardComp: React.FC = ({card,side,onChange,onRemove}) => { return ( -
+
{onRemove?.()}}>X onChange?.(new Card(newTitle,card.armor,card.helmet,...card.items))} />
- Helmet: onChange?.(new Card(card.title,card.armor,to,...card.items))} /> - Armor: onChange?.(new Card(card.title,to,card.helmet,...card.items))} /> + + Helmet: onChange?.(new Card(card.title,card.armor,to,...card.items))} /> + + + Armor: onChange?.(new Card(card.title,to,card.helmet,...card.items))} /> +
-
+
{card.items.map((item,i)=>
= ({cardGroup,side,onChange,onRemove}) => { return ( -
+
onRemove?.()} >X Num: onChange?.(new CardGroup(Math.max(newNum,0),...cardGroup.cards))} @@ -38,7 +38,7 @@ const CardGroupComp: React.FC = ({cardGroup,side,onChange,onRemove}) => { /> )}
onChange?.( new CardGroup( cardGroup.numInDeck, diff --git a/src/components/Deck.tsx b/src/components/Deck.tsx index 6a39fdc..c3ab725 100644 --- a/src/components/Deck.tsx +++ b/src/components/Deck.tsx @@ -15,7 +15,7 @@ interface Props { const DeckComp: React.FC = ({deck,side,title,onChange}) => { return ( -
+
{title} { side === Side.CT && D: = ({deck,side,title,onChange}) => { }} /> )} -
onChange?.( new Deck( deck.numDefusers, diff --git a/src/index.css b/src/index.css index bd6213e..01b2b2e 100644 --- a/src/index.css +++ b/src/index.css @@ -1,3 +1,7 @@ @tailwind base; @tailwind components; -@tailwind utilities; \ No newline at end of file +@tailwind utilities; + +.min-h-12 { + min-height: 12rem; +}