<commit_before>(ns status-im.components.button.styles
  (:require-macros [status-im.utils.styles :refer [defstyle defnstyle]])
  (:require [status-im.components.styles :as styles]
            [status-im.utils.platform :as platform]))

(def border-color styles/color-white-transparent-3)
(def border-color-high styles/color-white-transparent-4)

(def buttons-container {:flex-direction :row})

(def button-container styles/flex)

(defnstyle button [disabled?]
  {:flex-direction  :row
   :justify-content :center
   :align-items     :center
   :android         {:background-color border-color}
   :ios             (when-not disabled?
                      {:background-color border-color})})

(defn- border [position]
  (let [radius (if platform/ios? 8 4)]
    (case position
      :first {:border-bottom-left-radius radius
              :border-top-left-radius    radius
              :ios {:border-width 1}}
      :last  {:border-bottom-right-radius radius
              :border-top-right-radius    radius
              :ios {:border-width 1}}
      {:android {:border-left-width  1
                 :border-right-width 1}
       :ios     {:border-width 1}})))

(defnstyle button-bar [position]
  (merge {:border-color  border-color}
         (border position)))

(defnstyle button-text [disabled?]
  {:font-weight        :normal
   :color              styles/color-white
   :padding-horizontal 16
   :android            (merge
                         {:font-size          14
                          :padding-vertical   10
                          :letter-spacing     0.5}
                         (when disabled? {:opacity 0.4}))
   :ios                (merge
                         {:font-size        15
                          :padding-vertical 9
                          :letter-spacing   -0.2}
                         (when disabled? {:opacity 0.6}))})

(defstyle button-borders
  {:android           {:border-radius 4}
   :ios               {:border-radius 8}})

(def primary-button
  (merge
    button-borders
    {:background-color styles/color-blue4}))

(def primary-button-text {:color styles/color-white})

(def secondary-button
  (merge
    button-borders
    {:background-color styles/color-blue4-transparent}))

(def secondary-button-text {:color styles/color-blue4})<commit_msg>Fixed broken action button style on iOS<commit_after>(ns status-im.components.button.styles
  (:require-macros [status-im.utils.styles :refer [defstyle defnstyle]])
  (:require [status-im.components.styles :as styles]
            [status-im.utils.platform :as platform]))

(def border-color styles/color-white-transparent-3)
(def border-color-high styles/color-white-transparent-4)

(def buttons-container {:flex-direction :row})

(def button-container styles/flex)

(defnstyle button [disabled?]
  {:flex-direction  :row
   :justify-content :center
   :align-items     :center
   :android         {:background-color border-color}
   :ios             (when-not disabled?
                      {:background-color border-color})})

(defn- border [position]
  (let [radius (if platform/ios? 8 4)]
    (case position
      :first {:border-bottom-left-radius radius
              :border-top-left-radius    radius
              :ios {:border-width 1}}
      :last  {:border-bottom-right-radius radius
              :border-top-right-radius    radius
              :ios {:border-width 1}}
      {:android {:border-left-width  1
                 :border-right-width 1}
       :ios     {:border-width 1}})))

(defnstyle button-bar [position]
  (merge {:border-color  border-color}
         (border position)))

(defnstyle button-text [disabled?]
  {:font-weight        :normal
   :color              styles/color-white
   :padding-horizontal 16
   :android            (merge
                         {:font-size          14
                          :padding-vertical   10
                          :letter-spacing     0.5}
                         (when disabled? {:opacity 0.4}))
   :ios                (merge
                         {:font-size        15
                          :padding-vertical 9
                          :letter-spacing   -0.2}
                         (when disabled? {:opacity 0.6}))})

(defstyle button-borders
  {:android {:border-radius 4}
   :ios     {:border-radius 8
             ;; Border radius is ignored with transparent background unless overflow "hidden" is used
             ;; See https://github.com/facebook/react-native/issues/13760
             :overflow      :hidden}})

(def primary-button
  (merge
    button-borders
    {:background-color styles/color-blue4}))

(def primary-button-text {:color styles/color-white})

(def secondary-button
  (merge
    button-borders
    {:background-color styles/color-blue4-transparent}))

(def secondary-button-text {:color styles/color-blue4})
{'fraction_non_alphanumeric': 0.12163282221301285, 'fraction_numerical': 0.013883133029423953, 'mean_word_length': 1.9130959565479784, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2391375', 'n_tokens_mistral': 1432, 'n_tokens_neox': 1352, 'n_words': 317}