Skip to content

Commit

Permalink
PLT-6236 update buttons design on template contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
ladamesny committed Jul 13, 2023
1 parent fe528c0 commit adae077
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -250,23 +250,29 @@ mkComponent = do
Nothing -> DOM.div { className: "form-group" } fields
Just contract -> marloweYaml contract
formActions = fragment
[ link
{ label: DOOM.text "Cancel"
, onClick: onDismiss
, showBorders: true
, extraClassNames: "me-3"
}
, DOM.button
do
let
disabled = case result of
Just (V (Right _) /\ _) -> false
_ -> true
{ className: "btn btn-primary"
, onClick: onSubmit'
, disabled
}
[ DOOM.text "Submit" ]
[ DOM.div { className: "row" } $
[ DOM.div { className: "col-6 text-start" } $
[ link
{ label: DOOM.text "Cancel"
, onClick: onDismiss
, showBorders: true
, extraClassNames: "me-3"
}
]
, DOM.div { className: "col-6 text-end" } $
[ DOM.button
do
let
disabled = case result of
Just (V (Right _) /\ _) -> false
_ -> true
{ className: "btn btn-primary"
, onClick: onSubmit'
, disabled
}
[ DOOM.text "Submit" ]
]
]
]
pure $ BodyLayout.component
{ title: "Contract For Differences With Oracle"
Expand Down
40 changes: 23 additions & 17 deletions src/Component/ContractTemplates/Escrow.purs
Original file line number Diff line number Diff line change
Expand Up @@ -252,23 +252,29 @@ mkComponent = do
Nothing -> DOM.div { className: "form-group" } fields
Just contract -> marloweYaml contract
formActions = fragment
[ link
{ label: DOOM.text "Cancel"
, onClick: onDismiss
, showBorders: true
, extraClassNames: "me-3"
}
, DOM.button
do
let
disabled = case result of
Just (V (Right _) /\ _) -> false
_ -> true
{ className: "btn btn-primary"
, onClick: onSubmit'
, disabled
}
[ DOOM.text "Submit" ]
[ DOM.div { className: "row" } $
[ DOM.div { className: "col-6 text-start" } $
[ link
{ label: DOOM.text "Cancel"
, onClick: onDismiss
, showBorders: true
, extraClassNames: "me-3"
}
]
, DOM.div { className: "col-6 text-end" } $
[ DOM.button
do
let
disabled = case result of
Just (V (Right _) /\ _) -> false
_ -> true
{ className: "btn btn-primary"
, onClick: onSubmit'
, disabled
}
[ DOOM.text "Submit" ]
]
]
]
pure $ BodyLayout.component
{ title: "Escrow"
Expand Down
40 changes: 23 additions & 17 deletions src/Component/ContractTemplates/Swap.purs
Original file line number Diff line number Diff line change
Expand Up @@ -177,23 +177,29 @@ mkComponent = do
Nothing -> DOM.div { className: "form-group" } fields
Just contract -> marloweYaml contract
formActions = fragment
[ link
{ label: DOOM.text "Cancel"
, onClick: onDismiss
, showBorders: true
, extraClassNames: "me-3"
}
, DOM.button
do
let
disabled = case result of
Just (V (Right _) /\ _) -> false
_ -> true
{ className: "btn btn-primary"
, onClick: onSubmit'
, disabled
}
[ DOOM.text "Submit" ]
[ DOM.div { className: "row" } $
[ DOM.div { className: "col-6 text-start" } $
[ link
{ label: DOOM.text "Cancel"
, onClick: onDismiss
, showBorders: true
, extraClassNames: "me-3"
}
]
, DOM.div { className: "col-6 text-end" } $
[ DOM.button
do
let
disabled = case result of
Just (V (Right _) /\ _) -> false
_ -> true
{ className: "btn btn-primary"
, onClick: onSubmit'
, disabled
}
[ DOOM.text "Submit" ]
]
]
]
pure $ BodyLayout.component
{ title: "Swap"
Expand Down

0 comments on commit adae077

Please sign in to comment.