Skip to content

Commit

Permalink
Add more property documentation to multiple components
Browse files Browse the repository at this point in the history
  • Loading branch information
aartaka committed Dec 23, 2024
1 parent b6b40ba commit 5123437
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/hs_ui/components/checkbox.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@

;; TODO: Merge props, migrate styles to tailwind
(defn component
"Properties:
:c/small
:checked
:disabled
:on-change"
[props]
[:label.toggle.block {:style (when (:c/small props)
{:scale "0.7"})}
Expand Down
4 changes: 4 additions & 0 deletions src/hs_ui/components/content_expand.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
"select-none"])

(defn component
"Props:
:c/open?
:slot/close
:slot/open"
[props]
[:div (hs-ui.utils/merge-props {:class root-class} props)
(if (:c/open? props)
Expand Down
7 changes: 7 additions & 0 deletions src/hs_ui/components/input.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@


(defn component
"Properties:
:c/root-class
:data-invalid
:disabled
:type
:slot/right
:c/error-message"
[properties]
[:fieldset {:class (utils/class-names root-class (:c/root-class properties))
:data-invalid (:data-invalid properties)
Expand Down
8 changes: 8 additions & 0 deletions src/hs_ui/components/kvlist.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
[hs-ui.utils]))

(defn component
"Props:
:c/items
Item props:
:value/value
:value/hint
:key/value
:copy/copy"
[props]
[:table.table-fixed
[:tbody
Expand Down

0 comments on commit 5123437

Please sign in to comment.