Skip to content

Commit

Permalink
replace text-pure
Browse files Browse the repository at this point in the history
  • Loading branch information
flexsurfer committed Jan 24, 2024
1 parent 7e70401 commit dd562c5
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/quo/components/buttons/button/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
:size icon-size})

(string? children)
(text/text-pure
(text/text
{:size (when (#{56 24} size) :paragraph-2)
:weight :medium
:number-of-lines 1
Expand Down
5 changes: 3 additions & 2 deletions src/quo/components/buttons/logout_button/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
:disabled? disabled?})
container-style)}
(icon/icon :i/log-out {:color (if pressed? colors/white-opa-40 colors/white-opa-70)})
(text/text-pure {:weight :medium :size :paragraph-1}
(i18n/label :t/logout)))))
(text/text
{:weight :medium :size :paragraph-1}
(i18n/label :t/logout)))))

(defn view
[props]
Expand Down
2 changes: 1 addition & 1 deletion src/quo/components/dropdowns/dropdown/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
:no-color no-icon-color?
:size icon-size
:container-style style/left-icon}))
(text/text-pure
(text/text
{:size text-size
:weight :medium
:number-of-lines 1
Expand Down
9 changes: 4 additions & 5 deletions src/quo/components/markdown/text.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
children)))

(defn text
[]
(let [this (reagent/current-component)
props (reagent/props this)
children (reagent/children this)]
(rn.pure/func text-pure props children)))
[& children]
(let [props (first children)
props (when (map? props) props)]
(rn.pure/func text-pure props (if props (rest children) children))))
14 changes: 7 additions & 7 deletions src/quo/components/navigation/page_nav/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
[{:keys [centered? title center-opacity]}]
(rn.pure/view
{:style (style/center-content-container centered? center-opacity)}
(text/text-pure
(text/text
{:weight :medium
:size :paragraph-1
:number-of-lines 1}
Expand Down Expand Up @@ -124,13 +124,13 @@
(rn.pure/view
{:style (style/center-content-container false center-opacity)}
(rn.pure/image {:style style/token-logo :source token-logo})
(text/text-pure
(text/text
{:style style/token-name
:weight :semi-bold
:size :paragraph-1
:number-of-lines 1}
token-name)
(text/text-pure
(text/text
{:style (style/token-abbreviation theme background)
:weight :medium
:size :paragraph-2
Expand All @@ -144,7 +144,7 @@
(rn.pure/text
{:style style/channel-emoji}
channel-emoji)
(text/text-pure
(text/text
{:style style/channel-name
:weight :semi-bold
:size :paragraph-1
Expand All @@ -162,13 +162,13 @@
(group-avatar/view {:picture picture :size :size-28})))
(rn.pure/view
{:style style/title-description-container}
(text/text-pure
(text/text
{:style style/title-description-title
:weight :semi-bold
:size :paragraph-1
:number-of-lines 1}
title)
(text/text-pure
(text/text
{:style (style/title-description-description theme background)
:weight :medium
:size :paragraph-2
Expand All @@ -185,7 +185,7 @@
(rn.pure/image
{:style style/community-network-logo
:source shown-logo})
(text/text-pure
(text/text
{:weight :semi-bold
:size :paragraph-1
:number-of-lines 1}
Expand Down
2 changes: 1 addition & 1 deletion src/quo/components/settings/category/settings/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
(rn.pure/view
{:style (merge (style/container label) container-style)}
(when label
(text/text-pure
(text/text
{:weight :medium
:size :paragraph-2
:style (style/label theme blur?)}
Expand Down
8 changes: 4 additions & 4 deletions src/quo/components/settings/settings_item/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
(rn.pure/view
{:style style/status-container}
(rn.pure/view {:style (style/status-dot online? blur?)})
(text/text-pure
(text/text
{:size :paragraph-2
:style (style/color blur? theme)}
(if online? (i18n/label :t/online-now) text)))))
Expand All @@ -32,7 +32,7 @@
(let [{:keys [text icon]} description-props]
(rn.pure/view
{:style (style/sub-container :center)}
(text/text-pure
(text/text
{:size :paragraph-2
:style (style/color blur? theme)}
text)
Expand Down Expand Up @@ -84,7 +84,7 @@
[{:keys [label label-props blur? theme]}]
(rn.pure/view {:accessibility-label :label-component}
(case label
:text (text/text-pure
:text (text/text
{:style (style/color blur? theme)}
label-props)
:color (rn.pure/view
Expand Down Expand Up @@ -120,7 +120,7 @@
(rn.pure/func image-component props)
(rn.pure/view
{:style (style/left-container (:image props))}
(text/text-pure
(text/text
{:weight :medium
:style {:color (when blur? colors/white)}}
title)
Expand Down

0 comments on commit dd562c5

Please sign in to comment.