Liking cljdoc? Tell your friends :D

uix.compiler.attributes


cached-custom-prop-namecljs

(cached-custom-prop-name k)
source

cached-prop-namecljs

(cached-prop-name k)
source

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
sourceraw 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
sourceraw 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
sourceraw docstring

class-names-collcljs

(class-names-coll classes)
source

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
sourceraw docstring

compile-config-kvcljmultimethod

source

convert-custom-prop-valuecljs

(convert-custom-prop-value x)
source

convert-interop-prop-valuecljs

(convert-interop-prop-value k v)
source

convert-prop-valuecljs

(convert-prop-value x)
source

convert-prop-value-shallowcljs

(convert-prop-value-shallow x)
source

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
sourceraw docstring

convert-valueclj

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

convert-valuesclj

(convert-values m)
source

custom-kv-convcljs

(custom-kv-conv o k v)
source

custom-prop-name-cachecljs

source

dash-to-camelcljs

(dash-to-camel name-str)
source

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
sourceraw 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
sourceraw docstring

js-val?cljs

(js-val? x)
source

keyword->stringcljs

(keyword->string x)
source

kv-convcljs

(kv-conv o k v)
source

kv-conv-shallowcljs

(kv-conv-shallow o k v)
source

parse-tagclj/s

(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)
source (clj)source (cljs)raw docstring

prop-name-cachecljs

source

re-tagclj/s

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

HyperScript tag pattern :div :div#id.class etc.
source (clj)source (cljs)raw docstring

set-id-classclj

(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
sourceraw docstring

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

× close