small tweaks to docs

This commit is contained in:
Leo Horie 2016-12-01 01:49:19 -05:00
parent c5c18f9231
commit 87dcbbf5c7
19 changed files with 308 additions and 75 deletions

View file

@ -1,6 +1,6 @@
# m(selector, attributes, children)
- [API](#api)
- [Signature](#signature)
- [How it works](#how-it-works)
- [Flexibility](#flexibility)
- [CSS selectors](#css-selectors)
@ -17,13 +17,13 @@
---
### API
### Signature
`vnode = m(selector, attributes, children)`
Argument | Type | Required | Description
------------ | ------------------------------------------ | -------- | ---
`selector` | `String|Object` | Yes | A CSS selector or a [component](https://github.com/lhorie/mithril.js/blob/rewrite/docs/components.md)
`selector` | `String|Object` | Yes | A CSS selector or a [component](components.md)
`attributes` | `Object` | No | HTML attributes or element properties
`children` | `Array<Vnode>|String|Number|Boolean` | No | Child [vnodes](vnodes.md#structure). Can be written as [splat arguments](signatures.md#splats)
**returns** | `Vnode` | | A [vnode](vnodes.md#structure)