Skip to content

Commit

Permalink
Document tab and tabs properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
aartaka committed Dec 20, 2024
1 parent b69b232 commit 8869c93
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/hs_ui/components/tab.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
])

(defn component
"Possible component-specific props:
:id
:name
:c/selected?
:checked
:on-change
:slot/content"
[props]
[(if (:href props) :a :label) (dissoc (u/merge-props {:class root-class} props)
:on-change :name)
Expand Down
7 changes: 7 additions & 0 deletions src/hs_ui/organisms/tabs.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
"space-x-[theme(spacing.x3)]"])

(defn component
"Accepts a vector of maps, each map might have
:id
:name
:c/selected?
:checked
:on-change
:slot/content"
[props]
[:div (u/merge-props {:class root-class} props)
(for [item (:c/items props)] ^{:key (:id item)}
Expand Down

0 comments on commit 8869c93

Please sign in to comment.