From 2641b936bb8406bf3ff7180bc4984a8a9bb68631 Mon Sep 17 00:00:00 2001 From: Nicholas Sorokin Date: Sun, 7 Jul 2024 18:25:22 +0930 Subject: [PATCH] fix: form and popup style fixes --- src/App.tsx | 66 ++++++++++++++++++++------------ src/components/Popup.tsx | 11 +++++- src/components/common/Button.tsx | 1 + src/components/common/Input.tsx | 5 +-- src/components/common/Select.tsx | 39 +++++++++++++++++++ src/index.css | 11 ++++-- 6 files changed, 100 insertions(+), 33 deletions(-) create mode 100644 src/components/common/Select.tsx diff --git a/src/App.tsx b/src/App.tsx index 93693c9..bbdd5b6 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -10,7 +10,7 @@ import { faShuffle, faStar, } from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'; import { Dispatch, SetStateAction, @@ -20,17 +20,18 @@ import { useState, } from 'react'; import './App.css'; -import { CardBase } from './components/CardBase'; -import { DeckView } from './components/DeckView'; -import { Popup } from './components/Popup'; -import { Button } from './components/common/Button'; -import { Input } from './components/common/Input'; -import { H2 } from './components/common/Typography'; -import { cities } from './data/cities'; -import { Assortment, IAssortment } from './lib/Assortment'; -import { Card } from './lib/Card'; -import { Deck, IPossibleCard, IReadonlyPossibleCard } from './lib/Deck'; -import { useMutable } from './lib/Mutable'; +import {CardBase} from './components/CardBase'; +import {DeckView} from './components/DeckView'; +import {Popup} from './components/Popup'; +import {Button} from './components/common/Button'; +import {Input} from './components/common/Input'; +import {Select} from './components/common/Select'; +import {H2} from './components/common/Typography'; +import {cities} from './data/cities'; +import {Assortment, IAssortment} from './lib/Assortment'; +import {Card} from './lib/Card'; +import {Deck, IPossibleCard, IReadonlyPossibleCard} from './lib/Deck'; +import {useMutable} from './lib/Mutable'; const cityCards = Object.keys(cities).map((city) => Card.get({ name: city })); const shuffledCityCards = new Assortment( @@ -185,7 +186,13 @@ function App() {

Draw Chance

-
    +
      {cardDrawProbabilities.map( ({ card, probability }, index) => { const color = [...colors.entries()] @@ -397,23 +404,32 @@ function App() { infectionDeck.name = json.name; setEditDeckFormVisible(false); }} + style={{ + flexDirection: 'column', + }} > - - +
      + + +
      @@ -497,7 +513,7 @@ function SelectCardForm({ onSelectCard(card); }} > - +