Skip to content

Commit b97afd5

Browse files
committed
[wip]
1 parent 080a445 commit b97afd5

File tree

2 files changed

+77
-5
lines changed

2 files changed

+77
-5
lines changed

src/day8/re_frame_10x/navigation/views.cljs

+76-4
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@
3434
[day8.re-frame-10x.material :as material]
3535
[day8.re-frame-10x.styles :as styles]
3636
[day8.re-frame-10x.tools.shadow-dom :as tools.shadow-dom]
37-
[day8.re-frame-10x.popup :as popup])
37+
[day8.re-frame-10x.popup :as popup]
38+
[day8.re-frame-10x.component :as rfc]
39+
[re-fine.theme :as theme]
40+
[day8.re-frame-10x.theme :as tenx.theme])
3841
(:require-macros [day8.re-frame-10x.components.re-com :refer [inline-resource]]))
3942

4043
#_(defglobal container-styles
@@ -110,7 +113,7 @@
110113
:label title
111114
:on-click #(rf/dispatch [::settings.events/selected-tab panel-id])]]]))
112115

113-
(defclass tab-buttons-style
116+
(defclass panel-header-style
114117
[ambiance]
115118
{:composes (styles/navigation-border-top ambiance)
116119
:padding-left styles/gs-19})
@@ -144,14 +147,83 @@
144147
[replay-button]
145148
;; TODO: help smaller than what is currently to indicate Reply button is more important/relationship. e.g. just question mark, no button.
146149
[replay-help-button]]]))
150+
151+
152+
153+
154+
155+
156+
157+
158+
159+
160+
161+
162+
163+
164+
165+
166+
167+
168+
169+
170+
(theme/clear-global)
171+
(theme/reg-global tenx.theme/base tenx.theme/light)
172+
173+
(defn panel-header-tabs [{:keys [debug?]}]
174+
[rfc/horizontal-tabs
175+
{:theme [rfc/reset-theme! tenx.theme/gruvbox]
176+
#_#_:theme (fn [attr _ _] (update attr :style merge {:color "red"}))
177+
:tabs (cond-> [{:id :event :label "event"}
178+
{:id :fx :label "fx"}
179+
{:id :app-db :label "app-db"}
180+
{:id :subs :label "subs"}
181+
{:id :traces :label "traces"}
182+
{:id :timing :label "timing"}]
183+
debug? (conj {:id :debug :label "debug"}))
184+
:on-change #(rf/dispatch [::settings.events/selected-tab %])}])
185+
186+
187+
188+
189+
190+
191+
192+
193+
194+
195+
196+
197+
198+
199+
200+
201+
202+
203+
204+
205+
206+
207+
208+
209+
210+
211+
212+
213+
147214

148215
(defn panel-header
149216
[{:keys [debug?]}]
150217
(let [ambiance @(rf/subscribe [::settings.subs/ambiance])]
151218
[rc/h-box
152-
:class (tab-buttons-style ambiance)
219+
:class (panel-header-style ambiance)
153220
:justify :between
154-
:children [[panel-tabs debug?]
221+
:children [[rc/h-box
222+
:align :end
223+
:height "31px"
224+
:children
225+
[[panel-header-tabs {:debug? debug?}]]]
226+
#_[panel-tabs debug?]
155227
[replay-controls]]]))
156228

157229
(defclass warning-style

src/day8/re_frame_10x/styles.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@
336336

337337
(defclass navigation
338338
[_]
339-
{:background-color nord0}
339+
{:background-color nord4}
340340
[:.rc-label
341341
{:color nord5
342342
:font-weight :bold

0 commit comments

Comments
 (0)