Skip to content

Commit

Permalink
Fix dropdown class name
Browse files Browse the repository at this point in the history
  • Loading branch information
luigy committed Sep 24, 2021
1 parent 560b517 commit e146603
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions use-case-2/frontend/src/Frontend/Pool.hs
Expand Up @@ -141,15 +141,15 @@ poolDashboard wid = do
-- Select first token
selectionA <- divClass "input-group row" $ do
coinAChoice <- dropdown fstOpt (constDyn $ dropdownList) $
def { _dropdownConfig_attributes = constDyn ("class" =: "form-control col-md-1") }
def { _dropdownConfig_attributes = constDyn ("class" =: "form-select col-md-1") }
return $ _dropdown_value coinAChoice
let noduplicateDropdownList = Map.filterWithKey (\k _ -> k /= fstOpt) dropdownList
dynNonDuplicateDropdownList <- holdDyn noduplicateDropdownList $ ffor (updated selectionA)
$ \choice -> Map.filterWithKey (\k _ -> k /= choice) dropdownList
-- Select second token
selectionB <- divClass "input-group row mt-3" $ do
coinBChoice <- dropdown sndOpt dynNonDuplicateDropdownList $ DropdownConfig
{ _dropdownConfig_attributes = constDyn ("class" =: "form-control col-md-1")
{ _dropdownConfig_attributes = constDyn ("class" =: "form-select col-md-1")
, _dropdownConfig_setValue = (ffor (updated dynNonDuplicateDropdownList) $ \opts -> fst $ Map.elemAt 0 opts)
}
return $ _dropdown_value coinBChoice
Expand Down Expand Up @@ -272,7 +272,7 @@ poolDashboard wid = do
-- Select first token and amount
(selectionA, amountA) <- divClass "input-group row" $ do
coinAChoice <- dropdown fstOpt (constDyn $ dropdownList) $
def { _dropdownConfig_attributes = constDyn ("class" =: "form-control col-md-1") }
def { _dropdownConfig_attributes = constDyn ("class" =: "form-select col-md-1") }
coinAAmountInput <- inputElement $ def
& inputElementConfig_elementConfig . elementConfig_initialAttributes
.~ ("class" =: "form-control col-md-4" <> "type" =: "number")
Expand All @@ -285,7 +285,7 @@ poolDashboard wid = do
-- Select second token and amount
(selectionB, amountB) <- divClass "input-group row mt-3" $ do
coinBChoice <- dropdown sndOpt dynNonDuplicateDropdownList $ DropdownConfig
{ _dropdownConfig_attributes = constDyn ("class" =: "form-control")
{ _dropdownConfig_attributes = constDyn ("class" =: "form-select")
, _dropdownConfig_setValue = (ffor (updated dynNonDuplicateDropdownList) $ \opts -> fst $ Map.elemAt 0 opts)
}
coinBAmountInput <- inputElement $ def
Expand Down
4 changes: 2 additions & 2 deletions use-case-2/frontend/src/Frontend/Swap.hs
Expand Up @@ -106,7 +106,7 @@ selectCoins wid pabEV = do
-- Select first token and amount
(selectionA, amountA) <- divClass "input-group row" $ do
coinAChoice <- dropdown fstOpt (constDyn $ dropdownList) $
def { _dropdownConfig_attributes = constDyn ("class" =: "form-control") }
def { _dropdownConfig_attributes = constDyn ("class" =: "form-select") }
coinAAmountInput <- inputElement $ def
& inputElementConfig_elementConfig . elementConfig_initialAttributes
.~ ("class" =: "form-control" <> "type" =: "number")
Expand All @@ -119,7 +119,7 @@ selectCoins wid pabEV = do
-- Select second token and amount
(selectionB, amountB) <- divClass "input-group row mt-3" $ do
coinBChoice <- dropdown sndOpt dynNonDuplicateDropdownList $ DropdownConfig
{ _dropdownConfig_attributes = constDyn ("class" =: "form-control")
{ _dropdownConfig_attributes = constDyn ("class" =: "form-select")
, _dropdownConfig_setValue = (ffor (updated dynNonDuplicateDropdownList) $ \opts -> fst $ Map.elemAt 0 opts)
}
coinBAmountInput <- inputElement $ def
Expand Down

0 comments on commit e146603

Please sign in to comment.