Liking cljdoc? Tell your friends :D

uix.compiler.attributes


cached-custom-prop-namecljs

(cached-custom-prop-name k)

cached-prop-namecljs

(cached-prop-name k)

camel-case-domclj

(camel-case-dom k)

Turns kebab-case keyword into camel-case keyword, kebab-cased DOM attributes aria-* and data-* are not converted

Turns kebab-case keyword into camel-case keyword,
kebab-cased DOM attributes aria-* and data-* are not converted
raw docstring

camel-case-keysclj

(camel-case-keys m)

Takes map of attributes and returns same map with camel-cased keys

Takes map of attributes and returns same map with camel-cased keys
raw docstring

class-namescljs

(class-names a)
(class-names a b)
(class-names a b & rst)

Merges a collection of class names into a string

Merges a collection of class names into a string
raw docstring

class-names-collcljs

(class-names-coll classes)

compile-attrsclj

(compile-attrs attrs)
(compile-attrs attrs {:keys [custom-element?]})

Takes map of attributes and returns same map with keys translated from Clojure to React naming conventions

:class -> :className :margin-right -> :marginRight :on-click -> :onClick

Takes map of attributes and returns same map with keys
translated from Clojure to React naming conventions

:class -> :className
:margin-right -> :marginRight
:on-click -> :onClick
raw docstring

compile-config-kvcljmultimethod


convert-custom-prop-valuecljs

(convert-custom-prop-value x)

convert-interop-prop-valuecljs

(convert-interop-prop-value k v)

convert-prop-valuecljs

(convert-prop-value x)

convert-prop-value-shallowcljs

(convert-prop-value-shallow x)

convert-propscljs

(convert-props props id-class shallow?)

Converts props Clojure map into JS object suitable for passing as props object into React.createElement

  • props — Clojure map of props
  • id-class — a triplet of parsed tag, id and class names
  • shallow? — indicates whether props map should be converted shallowly or not
Converts `props` Clojure map into JS object suitable for
passing as `props` object into `React.createElement`

- `props` — Clojure map of props
- `id-class` — a triplet of parsed tag, id and class names
- `shallow?` — indicates whether `props` map should be converted shallowly or not
raw docstring

convert-valueclj

(convert-value v)
(convert-value k v)

convert-valuesclj

(convert-values m)

custom-kv-convcljs

(custom-kv-conv o k v)

custom-prop-name-cachecljs


dash-to-camelcljs

(dash-to-camel name-str)

interpret-attrscljs

(interpret-attrs maybe-attrs id-class shallow?)

Returns a tuple of attributes and a child element

  • [attrs] when attrs is actually a map of attributes
  • [nil attrs] when attrs is not a map, thus a child element
Returns a tuple of attributes and a child element

- [attrs] when `attrs` is actually a map of attributes
- [nil attrs] when `attrs` is not a map, thus a child element
raw docstring

interpret-propscljs

(interpret-props props)

Returns a tuple of component props and a child element

  • [props] when props is actually a map of attributes
  • [nil props] when props is not a map, thus a child element
Returns a tuple of component props and a child element

- [props] when `props` is actually a map of attributes
- [nil props] when `props` is not a map, thus a child element
raw docstring

js-val?cljs

(js-val? x)

keyword->stringcljs

(keyword->string x)

kv-convcljs

(kv-conv o k v)

kv-conv-shallowcljs

(kv-conv-shallow o k v)

parse-tagclj

(parse-tag tag)

Takes HyperScript tag (:div#id.class) and returns parsed tag, id and class fields, and boolean indicating if tag name is a custom element (a custom DOM element that has hyphen in the name)

Takes HyperScript tag (:div#id.class) and returns parsed tag, id and class fields,
and boolean indicating if tag name is a custom element (a custom DOM element that has hyphen in the name)
raw docstring

prop-name-cachecljs


re-tagclj

HyperScript tag pattern :div :div#id.class etc.

HyperScript tag pattern :div :div#id.class etc.
raw docstring

set-id-classclj/s≠

clj
(set-id-class props [_ id class])

Takes attributes map and parsed tag triplet, and returns attributes merged with class names and id

Takes attributes map and parsed tag triplet,
and returns attributes merged with class names and id
cljs
(set-id-class props id-class)

Takes attributes map and parsed tag, and returns attributes merged with class names and id

Takes attributes map and parsed tag, and returns attributes merged with class names and id
raw docstring

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

× close