From 8869c9380306500df87c8ae582e87dd2f26afddd Mon Sep 17 00:00:00 2001 From: Artyom Bologov Date: Fri, 20 Dec 2024 18:46:46 +0400 Subject: [PATCH] Document tab and tabs properties. --- src/hs_ui/components/tab.cljc | 7 +++++++ src/hs_ui/organisms/tabs.cljc | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/hs_ui/components/tab.cljc b/src/hs_ui/components/tab.cljc index 19b1976..f283422 100644 --- a/src/hs_ui/components/tab.cljc +++ b/src/hs_ui/components/tab.cljc @@ -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) diff --git a/src/hs_ui/organisms/tabs.cljc b/src/hs_ui/organisms/tabs.cljc index f083435..09a7aca 100644 --- a/src/hs_ui/organisms/tabs.cljc +++ b/src/hs_ui/organisms/tabs.cljc @@ -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)}