Merge pull request #1 from jonatack/readme_define-element_code_fix

Fix define-element code in README [skip ci]
This commit is contained in:
Bo Yao 2018-07-21 22:40:37 -04:00 committed by GitHub
commit 3138f7f7c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,9 +54,9 @@ All children will be flattened as if they're given inline.
(div :id id :class "big-dog"
children
"dog")
((div :id id :class "small-dog"
(div :id id :class "small-dog"
children
"dog"))))
"dog")))
```
`dog` will be defined as a function that takes `:id` and `:size` keyword arguments. `dog` returns an user-defined element object. Inside it, `children` will be replaced with the children elements you provided when creating this `dog`:
```