Skip to content

Commit

Permalink
Refactors
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrkhalil committed Apr 19, 2024
1 parent bc60bd5 commit 599ab4c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
(ns status-im.contexts.communities.actions.share-community.style
(:require [quo.foundations.colors :as colors]))

(def flex-direction-row {:flex-direction :row})
(def horizontal-padding 20)
(def vertical-padding 12)
(def gradient-cover-padding 20)
(def qr-code-padding 12)

(def header-container
{:padding-horizontal 20
:padding-vertical 12})
{:padding-horizontal horizontal-padding
:padding-vertical vertical-padding})

(def scan-notice
{:color colors/white-70-blur
Expand All @@ -16,12 +22,9 @@
{:margin-left (when thumbnail 8)})

(def qr-code-wrapper
{:padding-horizontal 20
{:padding-horizontal horizontal-padding
:margin-top 8})

(def gradient-cover-padding 20)
(def qr-code-padding 12)

(defn qr-code-size
[total-width]
(- total-width (* gradient-cover-padding 2) (* qr-code-padding 2)))
Expand All @@ -42,11 +45,17 @@
(def qr-top-wrapper
{:margin 12
:margin-bottom 0
:flex-direction :row
:flex-direction (:flex-direction flex-direction-row)
:align-items :center
:justify-content :space-between})

(def community-avatar-dimension 32)

(def community-avatar
{:border-radius 32
:width 32
:height 32})
{:border-radius community-avatar-dimension
:width community-avatar-dimension
:height community-avatar-dimension})

(def qr-code-view
{:padding-vertical vertical-padding
:align-items :center})
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
:bottom-color-override colors/white-opa-5}]
[rn/view
{:style style/qr-top-wrapper}
[rn/view {:flex-direction :row}
[rn/view style/flex-direction-row
(when thumbnail
[fast-image/fast-image
{:source thumbnail
Expand All @@ -74,8 +74,7 @@
:on-press on-press-share}
:i/share]]]
[rn/view
{:style {:padding-vertical 12
:align-items :center}}
{:style style/qr-code-view}
[qr-codes/qr-code
{:size (style/qr-code-size window-width)
:url url
Expand Down

0 comments on commit 599ab4c

Please sign in to comment.