Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/quangv/dr-dom
r-dom div wrapper
https://github.com/quangv/dr-dom
jsx r-dom react
Last synced: 26 days ago
JSON representation
r-dom div wrapper
- Host: GitHub
- URL: https://github.com/quangv/dr-dom
- Owner: quangv
- License: mit
- Created: 2018-04-18T07:48:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-05-16T18:59:25.000Z (over 6 years ago)
- Last Synced: 2024-10-01T18:32:32.196Z (about 1 month ago)
- Topics: jsx, r-dom, react
- Language: CoffeeScript
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dr-Dom
This library wraps [r-dom](https://github.com/uber/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](https://github.com/yosbelms/ramdascript) for us Lisp fans.
**Example:**
```coffee
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`.