💄 Make the title-bar component usable externally

By removing the usage of `?` character on prop names
This commit is contained in:
Andrey Antukh 2024-01-09 09:23:41 +01:00
parent e866e99804
commit 1822103936
36 changed files with 116 additions and 113 deletions

View file

@ -13,23 +13,23 @@
(mf/defc title-bar
{::mf/wrap-props false}
[{:keys [collapsable? collapsed? on-collapsed title children on-btn-click btn-children class clickable-all?]}]
[{:keys [collapsable collapsed on-collapsed title children on-btn-click btn-children class all-clickable]}]
(let [klass (dm/str (stl/css :title-bar) " " class)]
[:div {:class klass}
(if collapsable?
(if ^boolean collapsable
[:div {:class (stl/css :title-wrapper)}
(if clickable-all?
(if ^boolean all-clickable
[:button {:class (stl/css :toggle-btn)
:on-click on-collapsed}
[:span {:class (stl/css-case
:collapsabled-icon true
:rotated collapsed?)}
:rotated collapsed)}
i/arrow-refactor]
[:div {:class (stl/css :title)} title]]
[:*
[:button {:class (stl/css-case
:collapsabled-icon true
:rotated collapsed?)
:rotated collapsed)
:on-click on-collapsed}
i/arrow-refactor]
[:div {:class (stl/css :title)} title]])]