Skip to content

quangv/dr-dom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dr-Dom

This library wraps r-dom, with some added conveniences.

  • defaults to div
  • if next arg isString, assume className. (great for working with twitter-bootstrap)
  • idiomatic r-dom, very small wrapper.

Works well with twitter-bootstrap, coffee-script, react/create-react-app, jsx, ramdascript for us Lisp fans.

Example:

Form = ->
  d 'page', [
    d r.form, 'container', [
      d 'row', [
        d 'w-25 d-none d-lg-block', ''
        d 'col', [
          d 'form-group', [
            d r.input, 'form-control', type: 'email', placeholder: 'email'
          ]
          d 'form-group', [
            d r.input, 'form-control', type: 'password', placeholder: 'password'
          ]
          d [
            d r.button, 'btn btn-primary btn-block', type: 'submit', 'Login'
          ]
        ]
      ]
    ]
  ]

Notes:

  • could use some tests.
  • not under active development, but feel free to fork if you like r-dom.

About

r-dom div wrapper

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published