-
Notifications
You must be signed in to change notification settings - Fork 986
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* quo2: divider line
- Loading branch information
Showing
6 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
(ns quo2.components.dividers.divider-line.style | ||
(:require [quo2.foundations.colors :as colors])) | ||
|
||
(defn divider-line | ||
[blur? theme] | ||
{:border-color (if blur? | ||
(colors/theme-colors colors/neutral-80-opa-5 colors/white-opa-5 theme) | ||
(colors/theme-colors colors/neutral-10 colors/neutral-90 theme)) | ||
:padding-top 12 | ||
:padding-bottom 8 | ||
:border-bottom-width 1}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
(ns quo2.components.dividers.divider-line.view | ||
(:require | ||
[quo2.theme :as quo.theme] | ||
[react-native.core :as rn] | ||
[quo2.components.dividers.divider-line.style :as style])) | ||
|
||
(defn- view-internal | ||
[{:keys [blur? theme]}] | ||
[rn/view {:style (style/divider-line blur? theme)}]) | ||
|
||
(def view (quo.theme/with-theme view-internal)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/status_im2/contexts/quo_preview/dividers/divider_line.cljs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
(ns status-im2.contexts.quo-preview.dividers.divider-line | ||
(:require [quo2.core :as quo] | ||
[reagent.core :as reagent] | ||
[status-im2.contexts.quo-preview.preview :as preview])) | ||
|
||
(def descriptor | ||
[{:key :blur? | ||
:type :boolean}]) | ||
|
||
(defn view | ||
[] | ||
(let [state (reagent/atom {:blur? false})] | ||
(fn [] | ||
[preview/preview-container | ||
{:state state | ||
:descriptor descriptor | ||
:blur? (:blur? @state) | ||
:show-blur-background? true} | ||
[quo/divider-line @state]]))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters