Commit 416dc152 authored by Bruno Burke's avatar Bruno Burke 😁

link-style and boxed/rounded/.. options for scrollable-tabs

parent aada83c0
Pipeline #50103 passed with stages
in 3 minutes and 29 seconds
......@@ -213,9 +213,17 @@
(reagent/create-class
{:display-name (str "tabs-" id)
:reagent-render
(fn [{:keys [tabs]}]
(fn [{:keys [tabs centered? boxed? rounded? fullwidth? on-select]
:or {boxed? true
rounded? false
centered? false
fullwidth? false}}]
[:<>
[:div.tabs.is-boxed
[:div.tabs
{:class [(when boxed? "is-boxed")
(when rounded? "is-toggle is-toggle-rounded")
(when fullwidth? "is-fullwidth")
(when centered? "is-centered")]}
[:ul
{:id id}
(let [selected-index @selected-tab]
......@@ -226,7 +234,10 @@
"is-active")
:key (str "ul-tabs-" tid)}
[:a
{:on-click #(reset! selected-tab index)}
{:style (:link-style td)
:on-click #(do (reset! selected-tab index)
(when on-select
(on-select (:id td))))}
(:title td)]]))
tabs))]]
[:div.is-fullwidth
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment