pending badge on card itself

This commit is contained in:
Rob Culliton 2018-05-15 19:53:51 -04:00
parent 6da6f3417f
commit 6f268c85a4
No known key found for this signature in database
GPG Key ID: 6FDEF60B3DC84D94
2 changed files with 18 additions and 4 deletions

View File

@ -5,6 +5,14 @@
{:pre [(string? tla)]}
(get {"ETH" "#57a7ed"} tla "#4360df"))
(defn pending-badge []
"static component for pending badge"
[:div.dib.ph2.pv1.relative
{:style {:color "#CCAC00"}}
[:div.absolute.top-0.left-0.right-0.bottom-0.o-30.br2
{:style {:background-color "#FFD700"}}]
[:span.pg-med "Refund pending"]])
(defn balance-badge
[tla balance]
{:pre [(keyword? tla)]}

View File

@ -244,10 +244,16 @@
[:div bottom]]])
(defn small-card-balances [bounty]
[:div.f6.fl.w-80
[ui-balances/token-balances (bnt/crypto-balances bounty) :label]
[:div
[ui-balances/usd-value-label (:value-usd bounty)]]])
(let [pending-revocations (rf/subscribe [:pending-revocations])]
(fn [bounty]
[:div.f6.fl.w-80
[ui-balances/token-balances (bnt/crypto-balances bounty) :label]
[:div
[ui-balances/usd-value-label (:value-usd bounty)]]
(when (some #(= (:issue-id %)
(:issue-id bounty)) @pending-revocations)
[:div.pt1
[ui-balances/pending-badge]])])))
(defn three-dots-box [image-src]
"generates the appropriate container for menu dots"