Liking cljdoc? Tell your friends :D
ClojureScript only.

tw-cljs.core


twcljs

(tw & xs)

Merge tailwind class collections into props. Gives the tailwind call sites a bit more meaning to spot/get a hold of them later.

Accepts one or more collections of keywords or strings, plus an optional props map (similar to stylefy.core/use-style). Keywords tend to be less noisy as ClojureScript syntax. But many of the responsive tailwind styles will have to be supplied as strings (eg. "hover:text-bold"), since the inboard colon means the reader can't parse it as a keyword.

Examples: (tw [:a :b] {:on-click f}) => {:class ["a" "b"] :on-click f} (tw [:a] ["b:c"] [:d]) => {:class ["a" "b:c" "d"]}

Merge tailwind class collections into props. Gives the tailwind call sites a
bit more meaning to spot/get a hold of them later.

Accepts one or more collections of keywords or strings, plus an optional
props map (similar to stylefy.core/use-style). Keywords tend to be less
noisy as ClojureScript syntax. But many of the responsive tailwind styles
will have to be supplied as strings (eg.  "hover:text-bold"), since the
inboard colon means the reader can't parse it as a keyword.

Examples:
(tw [:a :b] {:on-click f}) => {:class ["a" "b"] :on-click f}
(tw [:a] ["b:c"] [:d])   => {:class ["a" "b:c" "d"]}
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close